{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "0a7d9800",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import cvxpy as cp\n",
    "import sklearn\n",
    "import sklearn.datasets\n",
    "from sklearn.ensemble import RandomForestRegressor\n",
    "import gurobipy\n",
    "import mosek\n",
    "import matplotlib.pyplot as plt\n",
    "from multiprocessing import Pool\n",
    "import time\n",
    "import os\n",
    "import seaborn as sns\n",
    "import pandas as pd\n",
    "# My Code\n",
    "import LearningMethod as lm\n",
    "import DataGeneration as dg\n",
    "import LinearProgramMethod as lpm\n",
    "import OnlineMethod as om"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 270,
   "id": "56a665b4",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Generate Fractional Knapsack Samples\n",
    "benchmark = 1\n",
    "dim_features = 5\n",
    "dim_decision = 10\n",
    "price = np.random.randint(low=1, high=1000, size=dim_decision)\n",
    "lower = np.amax(price)\n",
    "upper = (np.random.rand()-1)*lower + np.sum(price)\n",
    "Budget = [(upper-lower)*np.random.rand() + lower]\n",
    "Coeff_Mat = np.random.binomial(n=1, p=0.5, size = (dim_decision, dim_features))\n",
    "Theta_true = -np.concatenate((Coeff_Mat, np.zeros((dim_decision+1, dim_features))), axis=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 271,
   "id": "110aabc9",
   "metadata": {},
   "outputs": [],
   "source": [
    "N_train = 200\n",
    "# N_valid = 200\n",
    "N_test = 1000\n",
    "degree = 1\n",
    "additive_noise = 0.0\n",
    "scale_noise_uni = 0.0\n",
    "scale_noise_div = 0.0\n",
    "attack_threshold = 0.5\n",
    "attack_power = 3.0\n",
    "z_train, c_train, A_train, b_train = dg.GenerateFractionalKnapsack(N_samples=N_train, dim_features=dim_features, dim_decision=dim_decision, Coeff_Mat=Coeff_Mat, price=price, Budget=Budget,\n",
    "                                    degree=degree, additive_noise=additive_noise, scale_noise_uni=scale_noise_uni, scale_noise_div=scale_noise_div, attack_threshold = attack_threshold, attack_power = attack_power)\n",
    "# z_valid, c_valid, A_valid, b_valid = dg.GenerateFractionalKnapsack(N_samples=N_valid, dim_features=dim_features, dim_decision=dim_decision, Coeff_Mat=Coeff_Mat, price=price, Budget=Budget,\n",
    "#                                     degree=degree, additive_noise=additive_noise, scale_noise_uni=scale_noise_uni, scale_noise_div=scale_noise_div, attack_threshold = attack_threshold, attack_power = attack_power)\n",
    "z_test, c_test, A_test, b_test = dg.GenerateFractionalKnapsack(N_samples=N_test, dim_features=dim_features, dim_decision=dim_decision, Coeff_Mat=Coeff_Mat, price=price, Budget=Budget,\n",
    "                                    degree=degree, additive_noise=additive_noise, scale_noise_uni=scale_noise_uni, scale_noise_div=scale_noise_div, attack_threshold = attack_threshold, attack_power = attack_power)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 242,
   "id": "e881583a",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Generate Shortest Path Samples\n",
    "benchmark = 2\n",
    "dim_edge_vert = 4\n",
    "dim_edge_hori = 4\n",
    "dim_features = 6\n",
    "dim_cost = dim_edge_hori * (dim_edge_vert + 1) + (dim_edge_hori + 1) * dim_edge_vert\n",
    "Coeff_Mat = np.random.binomial(n=1, p=0.5, size = (dim_cost, dim_features))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 243,
   "id": "2798ce9e",
   "metadata": {},
   "outputs": [],
   "source": [
    "N_train = 200\n",
    "# N_valid = 200\n",
    "N_test = 1000\n",
    "degree = 6\n",
    "additive_noise = 0.0\n",
    "scale_noise_uni = 0.0\n",
    "scale_noise_div = 0.0\n",
    "attack_threshold = 0.5\n",
    "attack_power = 3.0\n",
    "z_train, c_train, A_train, b_train = dg.GenerateShortestPath(N_samples = N_train, dim_features = dim_features, Coeff_Mat=Coeff_Mat,\n",
    "                                                            dim_edge_vert = dim_edge_vert, dim_edge_hori = dim_edge_hori,\n",
    "                                                            degree=degree, additive_noise=additive_noise, scale_noise_uni=scale_noise_uni, scale_noise_div=scale_noise_div, attack_threshold=attack_threshold, attack_power=attack_power)\n",
    "# z_valid, c_valid, A_valid, b_valid = dg.GenerateShortestPath(N_samples = N_valid, dim_features = dim_features, Coeff_Mat=Coeff_Mat,\n",
    "#                                                             dim_edge_vert = dim_edge_vert, dim_edge_hori = dim_edge_hori,\n",
    "#                                                             degree=degree, additive_noise=additive_noise, scale_noise_uni=scale_noise_uni, scale_noise_div=scale_noise_div, attack_threshold=attack_threshold, attack_power=attack_power)\n",
    "z_test, c_test, A_test, b_test = dg.GenerateShortestPath(N_samples = N_test, dim_features = dim_features, Coeff_Mat=Coeff_Mat,\n",
    "                                                            dim_edge_vert = dim_edge_vert, dim_edge_hori = dim_edge_hori,\n",
    "                                                            degree=degree, additive_noise=additive_noise, scale_noise_uni=scale_noise_uni, scale_noise_div=scale_noise_div, attack_threshold=attack_threshold, attack_power=attack_power)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 272,
   "id": "7bddbbc7",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Time cost 3.0479962825775146\n"
     ]
    }
   ],
   "source": [
    "# Compute Optimal Solutions\n",
    "start = time.time()\n",
    "basic_train, nonb_train, solution_train = lpm.ComputeBasis(c=c_train, A=A_train, b=b_train)\n",
    "#basic_valid, nonb_valid, solution_valid = lpm.ComputeBasis(c=c_valid, A=A_valid, b=b_valid)\n",
    "basic_test, nonb_test, solution_test = lpm.ComputeBasis(c=c_test, A=A_test, b=b_test)\n",
    "print(\"Time cost\", time.time() - start)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 273,
   "id": "98af1ea1",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Method Random Forest\n",
      "Training samples 200\n",
      "Time Cost 0.12495756149291992\n",
      "Loss 0.03380842495184928 Error 0.25047181153666687 Normalized Error 0.20005805812298777\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX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wzsGjneCdx+hBlJ0iboE/orwFySPUm2AoeBxbGZReBI9+mbA8Ddqroz5b1Kkh7BuqGvqgfAceAS8Crwmaq6nuRYkmPd2EXgJrAE/DHwm69fn+TTwJeA55MsJ/nQlF+DJGkNqdrQrfQnYjAY1HA43Oxt6C0mCU/j388b1crr0JOV5GpVDSat+c1YSWqcoZekxhl6SWqcoZekxhl6SWqcoZekxhl6SWqcoZekxhl6SWqcoZekxhl6SWqcoZekxhl6SWqcoZekxhl6SWqcoZekxhl6SWqcoZekxhl6SWpcr9AnOZjkRpKlJCcmrCfJyW79WpJ9fa+VJD1e64Y+yQxwCjgE7AVeSrJ3bOwQMNc9FoDTG7hWkvQY9XlHvx9YqqqbVXUfuADMj83MA+dr1WVgW5LtPa+VJD1GW3rM7ABujRwvAy/0mNnR81oAkiyw+m8DPPfccz22Jf1/9dF3wMd+YrO38abVR9+x2VtQY/qEPhPOVc+ZPteunqw6C5wFGAwGE2ekNX3s7mbvQHoq9Qn9MrBr5HgncLvnzNYe10qSHqM+9+ivAHNJ9iTZChwGFsdmFoEj3advDgB3q+pOz2slSY/Ruu/oq+pBkuPAJWAGOFdV15Mc69bPABeBF4El4B5wdK1rH8srkSRNlKqn73b4YDCo4XC42duQpLeMJFerajBpzW/GSlLjDL0kNc7QS1LjDL0kNe6p/M3YJCvAtzd7H9IEzwLf2exNSBP8dFXNTlp4KkMvPa2SDB/2yQbpaeWtG0lqnKGXpMYZemljzm72BqSN8h69JDXOd/SS1DhDL0mNM/RSD0nOJXktydc3ey/SRhl6qZ9PAgc3exPSozD0Ug9V9UXgu5u9D+lRGHpJapyhl6TGGXpJapyhl6TGGXqphySfBr4EPJ9kOcmHNntPUl/+JxAkqXG+o5ekxhl6SWqcoZekxhl6SWqcoZekxhl6SWqcoZekxv0v6MBk+Zfl5MwAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Tuning Hyperparameters\n",
    "# Random Forest\n",
    "# No Theta, directly predict c\n",
    "alg = 'RF'\n",
    "print(\"Method Random Forest\")\n",
    "print(\"Training samples\", N_train)\n",
    "start = time.time()\n",
    "regr = RandomForestRegressor(random_state=0)\n",
    "regr.fit(z_train, c_train)\n",
    "hat_c = regr.predict(z_test)\n",
    "globals()[\"time_\"+alg] = time.time() - start\n",
    "print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark, A=A_test, b=b_test, c=c_test, z=z_test,\n",
    "                                                                                         direct=True, hat_c=hat_c, solved = True, solution=solution_test)\n",
    "print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "plt.boxplot(globals()[\"loss_\"+alg], showfliers = False)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 274,
   "id": "981f0650",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Method Ordinary Least Squares\n",
      "Training samples 200\n",
      "Time Cost 0.5820002555847168\n",
      "Loss 0.06832881583134345 Error 0.8609454182906243 Normalized Error 0.30683446896519434\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAD4CAYAAADlwTGnAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAPpklEQVR4nO3dX4id9Z3H8fdnY73YVteIow0x3UgZWnKxpHJQoVAoS0vixcZeCPFiDSKkQkMrtBehN3XvpNgWBFFSGjZCW3FpxbmQWgmFvdGSExE1leCsWB0TkimKFoTa1O9ezBM4HI8zz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JCkRhkAktQoA0CSGmUASFKjDABJapQBIEmNWvEXwaSNrn50Jdz3L+s9jFWrH1253kPQJcYA0CUv//XeJfFLWkmo+9Z7FLqUuAQkSY0yACSpUQaAJDWqVwAk2ZXkZJL5JAcn1CfJg139i0luXKlvkquTPJPk1W67eW2mJEnqY8UASLIJeAjYDewA7kiyY6zZbmC2e+0HHu7R9yBwtKpmgaPdsSTpIulzB3ATMF9Vr1XVB8BjwJ6xNnuAR2vJc8BVSbas0HcPcKTbPwLctrqpSJKm0ecx0K3AmyPHC8DNPdpsXaHvdVV1GqCqTie5dtLFk+xn6a6CL3zhCz2GK31UkvUewqpt3uwqqdZWnwCY9M4Zf6j649r06busqjoEHAIYDAYb/2FuXXSXwncApE9CnyWgBWDbyPH1wKmebZbre6ZbJqLbnu0/bEnSavUJgGPAbJIbklwO7AXmxtrMAXd2TwPdArzbLe8s13cO2Nft7wOeXOVcJElTWHEJqKrOJTkAPA1sAg5X1Ykk93T1jwBPAbcC88D7wF3L9e1OfT/weJK7gTeA29d0ZpKkZWUjrY8OBoMaDofrPQxJ2lCSHK+qwXi53wSWpEYZAJLUKANAkhplAEhSozbUH4GTLAJ/Xu9xSBNcA/xlvQchfYx/raqZ8cINFQDSp1WS4aSnLKRPM5eAJKlRBoAkNcoAkNbGofUegDQt/wYgSY3yDkCSGmUASFKjDABpFZIcTnI2ycvrPRZpWgaAtDr/Dexa70FIF8IAkFahqv4XeHu9xyFdCANAkhplAEhSowwASWqUASBJjTIApFVI8mvgWeBLSRaS3L3eY5L68n8FIUmN8g5AkhplAEhSowwASWqUASBJjTIAJKlRBoAkNcoAkKRG/T+MFWnCGoWKNgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Tuning Hyperparameters\n",
    "# Ordinary Least Squares\n",
    "alg = 'OLS'\n",
    "print(\"Method Ordinary Least Squares\")\n",
    "print(\"Training samples\", N_train)\n",
    "start = time.time()\n",
    "globals()[\"Theta_\"+alg] = lm.OrdinaryLeastSquares(A = A_train, b = b_train, c = c_train, z = z_train)\n",
    "globals()[\"time_\"+alg] = time.time() - start\n",
    "print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = z_test, direct = False,\n",
    "                                                                                                Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "plt.boxplot(globals()[\"loss_\"+alg], showfliers = False)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 275,
   "id": "27618b67",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Method Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 0.5272572040557861\n",
      "Loss 0.06762272731016741 Error 0.8602416757934123 Normalized Error 0.30677793294300043\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAD4CAYAAADlwTGnAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAPpklEQVR4nO3dX4id9Z3H8fdnY73YVteIow0x3UgZWnKxpHJQoVAoS0vixcZeCPFiDSKkQkMrtBehN3XvpNgWBFFSGjZCW3FpxbmQWgmFvdGSExE1leCsWB0TkimKFoTa1O9ezBM4HI8zz8mMGSe/9wsOz/P8/jzP7wc55+Pzm+d4UlVIktrzT+s9AEnS+jAAJKlRBoAkNcoAkKRGGQCS1KjL1nsA07jmmmt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7FLqUuAQkSY0yACSpUQaAJDWqVwAk2ZXkZJL5JAcn1CfJg139i0luXKlvkquTPJPk1W67eW2mJEnqY8UASLIJeAjYDewA7kiyY6zZbmC2e+0HHu7R9yBwtKpmgaPdsSTpIulzB3ATMF9Vr1XVB8BjwJ6xNnuAR2vJc8BVSbas0HcPcKTbPwLctrqpSJKm0ecx0K3AmyPHC8DNPdpsXaHvdVV1GqCqTie5dtLFk+xn6a6CL3zhCz2GK31UkvUewqpt3uwqqdZWnwCY9M4Zf6j649r06busqjoEHAIYDAYb/2FuXXSXwncApE9CnyWgBWDbyPH1wKmebZbre6ZbJqLbnu0/bEnSavUJgGPAbJIbklwO7AXmxtrMAXd2TwPdArzbLe8s13cO2Nft7wOeXOVcJElTWHEJqKrOJTkAPA1sAg5X1Ykk93T1jwBPAbcC88D7wF3L9e1OfT/weJK7gTeA29d0ZpKkZWUjrY8OBoMaDofrPQxJ2lCSHK+qwXi53wSWpEYZAJLUKANAkhplAEhSozbUH4GTLAJ/Xu9xSBNcA/xlvQchfYx/raqZ8cINFQDSp1WS4aSnLKRPM5eAJKlRBoAkNcoAkNbGofUegDQt/wYgSY3yDkCSGmUASFKjDABpFZIcTnI2ycvrPRZpWgaAtDr/Dexa70FIF8IAkFahqv4XeHu9xyFdCANAkhplAEhSowwASWqUASBJjTIApFVI8mvgWeBLSRaS3L3eY5L68n8FIUmN8g5AkhplAEhSowwASWqUASBJjTIAJKlRBoAkNcoAkKRG/T+MFWnCGoWKNgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Tuning Hyperparameters\n",
    "# Ridge Regression\n",
    "alg = 'Ridge'\n",
    "print(\"Method Ridge Regression\")\n",
    "print(\"Training samples\", N_train)\n",
    "start = time.time()\n",
    "globals()[\"Theta_\"+alg] = lm.RidgeRegression(A = A_train, b = b_train, c = c_train,  z = z_train, regular_const = 1e-1)\n",
    "globals()[\"time_\"+alg] = time.time() - start\n",
    "print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = z_test, direct = False,\n",
    "                                                                                                Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "plt.boxplot(globals()[\"loss_\"+alg], showfliers = False)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 276,
   "id": "7964f0ad",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Method PolyKer Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 1.7030000686645508\n",
      "Loss 0.029628839750320244 Error 0.39511874129708213 Normalized Error 0.161843641620592\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAD4CAYAAADlwTGnAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAARjElEQVR4nO3db4idZ17/8ffnl5AfCK5p6VRD/vwSZbYQl0XC2WwQRFwpJGXZ8ckP0ifJrxaH7BJBQdfIwqrPigpiMaRk/YVuQFoqrDpgJJZ9YJ80mpPFrY1r3SHoZkw0s7TkSXFD8OuDuYuzJydz7vnTzE6v9wsOc+7r+l73uS6Ymc/c97nP3KkqJEnt+V+bPQFJ0uYwACSpUQaAJDXKAJCkRhkAktSo7Zs9gdV44oknav/+/Zs9DUnaUq5du/bdqpoabe8VAEmOAn8IbAP+uKpeGOlP1/8M8D7w/6rqG13fBe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JWlKqtc1p9MBjUcDjc7GlI0paS5FpVDUbb/SSwJDXKAJCkRhkAktQoA0CSGrWl3gROsgj862bPQxrjCeC7mz0J6SH+T1VNjTZuqQCQflAlGY67ykL6QeYpIElqlAEgSY0yAKSNcX6zJyCtlu8BSFKjPAKQpEYZAJLUKANAWockF5LcSfL2Zs9FWi0DQFqfl4Gjmz0JaS0MAGkdquoN4N3Nnoe0FgaAJDXKAJCkRhkAktQoA0CSGmUASOuQ5BXgTeCpJAtJnt/sOUl9+a8gJKlRHgFIUqMMAElqlAEgSY0yACSpUQaAJDXKAJCkRhkAktSo/wak7fehjPHbDgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Tuning Hyperparameters\n",
    "# Polynomial Kernelized Ridge Regression\n",
    "alg = 'PolyRidge'\n",
    "print(\"Method PolyKer Ridge Regression\")\n",
    "print(\"Training samples\", N_train)\n",
    "ker_z_train = lm.PolyKernel(z = z_train, benchmark_z = z_train, gamma=1.0, degree=3, coef0=1.0)\n",
    "ker_z_test = lm.PolyKernel(z = z_test, benchmark_z = z_train, gamma=1.0, degree=3, coef0=1.0)\n",
    "start = time.time()\n",
    "globals()[\"Theta_\"+alg] = lm.RidgeRegression(A = A_train, b = b_train, c = c_train,  z = ker_z_train, regular_const = 1e-2)\n",
    "globals()[\"time_\"+alg] = time.time() - start\n",
    "print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = ker_z_test, direct = False,\n",
    "                                                                                                Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "plt.boxplot(globals()[\"loss_\"+alg], showfliers = False)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 277,
   "id": "b09e3350",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Method RbfKer Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 1.6939995288848877\n",
      "Loss 0.0058258116994683515 Error 0.30909323098222763 Normalized Error 0.08660323790949757\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAD4CAYAAADhNOGaAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAALP0lEQVR4nO3cX4idd17H8ffHxFyIYndJupvNHydoEAcRLIdY2Du7lSQuzV4moA1VCAUDKyhr1t7sZUFQKYaWoMUWF8OCygYZid0qeGMlk3W3a4ixQ3DNmLidXaEKvQjBrxc5xenxJHMmz4nT+H2/YJh5fs/vOc+3N3lznpnTVBWSpL6+b6sHkCRtLUMgSc0ZAklqzhBIUnOGQJKa277VAzyInTt31sLCwlaPIUmPlMuXL3+3qnZNrj+SIVhYWGB5eXmrx5CkR0qSb09b99GQJDVnCCSpOUMgSc0ZAklqzhBIUnOGQJKaMwSS1JwhkKTmDIEkNWcIJKk5QyBJzRkCSWrOEEhSc4ZAkpozBJLUnCGQpOYMgSQ1ZwgkqTlDIEnNGQJJas4QSFJzhkCSmjMEktScIZCk5gyBJDU3lxAkOZzkWpKVJGemnE+Sl8bn307yxMT5bUn+Psmfz2MeSdLsBocgyTbgLHAEWAROJFmc2HYEODj+OgW8PHH+88DVobNIkjZvHu8IDgErVXW9qm4D54FjE3uOAa/XXW8BjyXZDZBkL/DzwO/PYRZJ0ibNIwR7gBvrjlfHa7Pu+V3gC8B/3e8mSU4lWU6yvLa2Nmh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eatnkmbl/2JCkprzHYEkNWcIJKk5QyBJzRkCSWrOEEhSc4ZAkpozBJLU3H8D43KS8LMBz34AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Tuning Hyperparameters\n",
    "# Rbf Kernelized Ridge Regression\n",
    "alg = 'RbfRidge'\n",
    "print(\"Method RbfKer Ridge Regression\")\n",
    "print(\"Training samples\", N_train)\n",
    "ker_z_train = lm.ExpKernel(z = z_train, benchmark_z = z_train, gamma=5e-1)\n",
    "ker_z_test = lm.ExpKernel(z = z_test, benchmark_z = z_train, gamma=5e-1)\n",
    "start = time.time()\n",
    "globals()[\"Theta_\"+alg] = lm.RidgeRegression(A = A_train, b = b_train, c = c_train,  z = ker_z_train, regular_const = 1e-2)\n",
    "globals()[\"time_\"+alg] = time.time() - start\n",
    "print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = ker_z_test, direct = False,\n",
    "                                                                                                Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "plt.boxplot(globals()[\"loss_\"+alg], showfliers = False)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 281,
   "id": "5100885e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Method SVM Margin Learning\n",
      "Training samples 200\n",
      "Time Cost 0.4699997901916504\n",
      "Loss 0.0016915103812121025 Error 3.048441759363658 Normalized Error 0.9241851607594103\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoA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EXgRJLFdef3AU8D/zJwFknSAxgagmPAa+OfXwM+N2XPIWClqq5X1W3g/Pi6D/wO8AWgBs4iSXoAQ0Pwiaq6BTD+/viUPXuAG+uOV8drJHkG+Neq+uZGN0pyKslykuW1tbWBY0uSPrB9ow1JvgZ8csqpF2a8R6asVZIfGL/Gz83yIlV1DjgHMBqNfPcgSXOyYQiq6jP3OpfkO0l2V9WtJLuBd6dsWwX2rTveC9wEfhQ4AHwzyQfrX09yqKr+bRP/DZKkAYY+GroAnBz/fBL46pQ9l4CDSQ4k2QEcBy5U1beq6vGqWqiqBe4G4wkjIEn/t4aG4EXg6STvcPcvf14ESPKpJEsAVXUHOA1cBK4CX6mqKwPvK0makw0fDd1PVX0PeGrK+k3g6LrjJWBpg9daGDKLJOnB+MliSWrOEEhSc4ZAkpozBJLUnCGQpOYMgSQ1ZwgkqTlDIEnNGQJJas4QSFJzhkCSmjMEktScIZCk5gyBJDVnCCSpOUMgSc0ZAklqzhBIUnOGQJKaMwSS1JwhkKTmDIEkNWcIJKk5QyBJzaWqtnqGTUuyBnx7q+eQptgJfHerh5Du4Ueqatfk4iMZAumjKslyVY22eg5pM3w0JEnNGQJJas4QSPN1bqsHkDbL3xFIUnO+I5Ck5gyBJDVnCKQ5SPJqkneT/MNWzyJtliGQ5uMPgcNbPYT0IAyBNAdV9TfAv2/1HNKDMASS1JwhkKTmDIEkNWcIJKk5QyDNQZI/Bv4W+PEkq0l+eatnkmbl/2JCkprzHYEkNWcIJKk5QyBJzRkCSWrOEEhSc4ZAkpozBJLU3H8D43KS8LMBz34AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Tuning Hyperparameters\n",
    "# Margin Learning\n",
    "# Do not need true c\n",
    "# Do not need solution x but basis\n",
    "alg = 'ML'\n",
    "print(\"Method SVM Margin Learning\")\n",
    "print(\"Training samples\", N_train)\n",
    "start = time.time()\n",
    "globals()[\"Theta_\"+alg] = lm.MarginLearning(A = A_train, b = b_train, z = z_train, basic = basic_train, nonb = nonb_train, \n",
    "                                            regular_const = 1e-3)\n",
    "globals()[\"time_\"+alg] = time.time() - start\n",
    "print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = z_test, direct = False,\n",
    "                                                                                                Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "plt.boxplot(globals()[\"loss_\"+alg], showfliers = False)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 282,
   "id": "289330b5",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Method Poly-Kernelized SVM Margin Learning\n",
      "Training samples 200\n",
      "Time Cost 4.7129998207092285\n",
      "Loss 0.012294298375486162 Error 11.10446508098175 Normalized Error 0.937811749639154\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAD4CAYAAADhNOGaAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAALP0lEQVR4nO3cX4idd17H8ffHxFyIYndJupvNHydoEAcRLIdY2Du7lSQuzV4moA1VCAUDKyhr1t7sZUFQKYaWoMUWF8OCygYZid0qeGMlk3W3a4ixQ3DNmLidXaEKvQjBrxc5xenxJHMmz4nT+H2/YJh5fs/vOc+3N3lznpnTVBWSpL6+b6sHkCRtLUMgSc0ZAklqzhBIUnOGQJKa277VAz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6mqKwPvK0makw0fDd1PVX0PeGrK+k3g6LrjJWBpg9daGDKLJOnB+MliSWrOEEhSc4ZAkpozBJLUnCGQpOYMgSQ1ZwgkqTlDIEnNGQJJas4QSFJzhkCSmjMEktScIZCk5gyBJDVnCCSpOUMgSc0ZAklqzhBIUnOGQJKaMwSS1JwhkKTmDIEkNWcIJKk5QyBJzaWqtnqGTUuyBnx7q+eQptgJfHerh5Du4Ueqatfk4iMZAumjKslyVY22eg5pM3w0JEnNGQJJas4QSPN1bqsHkDbL3xFIUnO+I5Ck5gyBJDVnCKQ5SPJqkneT/MNWzyJtliGQ5uMPgcNbPYT0IAyBNAdV9TfAv2/1HNKDMASS1JwhkKTmDIEkNWcIJKk5QyDNQZI/Bv4W+PEkq0l+eatnkmbl/2JCkprzHYEkNWcIJKk5QyBJzRkCSWrOEEhSc4ZAkpozBJLU3H8D43KS8LMBz34AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Tuning Hyperparameters\n",
    "# Polynomial Kernelized Margin Learning\n",
    "# Do not need true c\n",
    "# Do not need solution x but basis\n",
    "alg = 'PolyKer'\n",
    "ker_z_train = lm.PolyKernel(z = z_train, benchmark_z = z_train, gamma=1.0, degree=2, coef0=1.0)\n",
    "ker_z_test = lm.PolyKernel(z = z_test, benchmark_z = z_train, gamma=1.0, degree=2, coef0=1.0)\n",
    "print(\"Method Poly-Kernelized SVM Margin Learning\")\n",
    "print(\"Training samples\", N_train)\n",
    "start = time.time()\n",
    "globals()[\"Theta_\"+alg] = lm.KernelizedMarginLearning(A = A_train, b = b_train, z = ker_z_train, basic = basic_train, nonb = nonb_train,\n",
    "                                                      regular_const=1e-2)\n",
    "globals()[\"time_\"+alg] = time.time() - start\n",
    "print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = ker_z_test, direct = False,\n",
    "                                                                                                Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "plt.boxplot(globals()[\"loss_\"+alg], showfliers = False)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 283,
   "id": "45f6c63c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Method Rbf Kernelized SVM Margin Learning\n",
      "Training samples 200\n",
      "Time Cost 4.519703149795532\n",
      "Loss 0.011525851534170226 Error 2.6364014083571403 Normalized Error 0.9361232177352075\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAD4CAYAAAAHHSreAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAOoklEQVR4nO3dQYid5b3H8e/vJsSdN4rTIoneRJheiKVYOVg3uikXk1A6bUGIG8UWQkBXbhrpoqWrQne2am4W4RqoN7gpHWiKFRft5obmhIo0tmnHSOtgqNNGskmJjP13MW+50/Mc57wzmWSS8fuBlznv+zz/532excyP933PmZOqQpKk5f5toycgSbrxGA6SpIbhIElqGA6SpIbhIElqbN3oCayHO+64o3bt2rXR05Ckm8qZM2f+UlVT49o2RTjs2rWL4XC40dOQpJtKkj9+XJu3lSRJDcNBktQwHCRJDcNBktQwHCRJDcNBktQwHCRJDcNBktTYFB+Ck66XJNflPH7Pijaa4SCtwlr+aCfxj71uOt5WkiQ1DAdJUsNwkCQ1DAdJUsNwkCQ1DAdJUsNwkCQ1DAdJUsNwkCQ1D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SJIahoMkqWE4SJIam+KBdJIF4I8bPQ/pY9wB/GWjJyGN8R9VNTWuYVOEg3QjSzL8uHeESDcqbytJkhqGgySpYThI197RjZ6AtFo+c5AkNbxykCQ1DAdJUsNwkK6RJMeSvJ/kNxs9F2m1DAfp2vkfYO9GT0JaC8NBukaq6pfAxY2eh7QWhoMkqWE4SJIahoMkqWE4SJIahoN0jST5X+D/gP9MMp/kGxs9J6kv/32GJKnhlYMkqWE4SJIahoMkqWE4SJIahoMkqWE4SJIahoMkqfEPX5ucTb9sV70AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Tuning Hyperparameters\n",
    "# Rbf Kernelized Margin Learning\n",
    "# Do not need true c\n",
    "# Do not need solution x but basis\n",
    "alg = 'ExpRbf'\n",
    "ker_z_train = lm.ExpKernel(z = z_train, benchmark_z = z_train, gamma=2e0)\n",
    "ker_z_test = lm.ExpKernel(z = z_test, benchmark_z = z_train, gamma=2e0)\n",
    "print(\"Method Rbf Kernelized SVM Margin Learning\")\n",
    "print(\"Training samples\", N_train)\n",
    "start = time.time()\n",
    "globals()[\"Theta_\"+alg] = lm.KernelizedMarginLearning(A = A_train, b = b_train, z = ker_z_train, basic = basic_train, nonb = nonb_train,\n",
    "                                                      regular_const=1e-3)\n",
    "globals()[\"time_\"+alg] = time.time() - start\n",
    "print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = ker_z_test, direct = False,\n",
    "                                                                                                Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "plt.boxplot(globals()[\"loss_\"+alg], showfliers = False)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 191,
   "id": "de13a28d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Method SPO+\n",
      "Training samples 200\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAD4CAYAAADFAawfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAeUElEQVR4nO3deXTU1cH/8fdNSCAJSyCEnRDCErawhk2sYl2ggiAgdXmwVVvRp5utgkrcFRFRW2n1USmVR39Fq+wgiIqiuBVFJDth35eELQtknbnPH4m/IqIZZCbfWT6vczwmmcnM53xP5nMu3/v93mustYiIiP8KczqAiIj8MBW1iIifU1GLiPg5FbWIiJ9TUYuI+Ll6vnjR5s2b28TERF+8tIhIUPrqq6+OWGvjz/aYT4o6MTGRDRs2+OKlRUSCkjFm9/c9plMfIiJ+TkUtIuLnPCpqY0ysMWahMWazMSbXGDPU18FERKSap+eoZwOrrbXXGGMigWgfZhIRkdPUWtTGmMbARcBNANbaCqDCt7FEROQbnpz6SAIKgHnGmK+NMXONMTFnPskYM9kYs8EYs6GgoMDrQUVEQpUnRV0P6A+8YK3tB5wE7j3zSdbaOdbaVGttanz8WS8FFBGRH8GTot4H7LPWrq/5fiHVxS0iIjW+2HmMFz/a7pPXrrWorbWHgL3GmOSaH10K5PgkjYhIgDl+soJ7Fmbw85c+57X1ezhVUeX19/D0qo/fA/NrrvjYAdzs9SQiIgHEWsuSr/czfWUuhaWV3HZxEndc2oXoSO/f8O3RK1prNwGpXn93EZEAtKOghPuXZvHZ9qP0S4hlxrgUurdu7LP388laHyIiwai8ysULH27nf9Zup35EGNOv7sUNgxIICzM+fV8VtYiIBz7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ueMted8b0rtL2pMAbD7R/56c+CIF+MEMh2Lb9Px+DYdj/8IhmPRwVobf7YHfFLU58MYs8Fam+p0Dn+gY/FtOh7fpuPxH8F+LHTqQ0TEz6moRUT8nD8W9RynA/gRHYtv0/H4Nh2P/wjqY+F356hFROTb/HFELSIip1FRi4j4Ob8pamPMSGNMnjFmmzHmXqfzOMkY094Ys9YYk2uMyTbG3OF0JqcZY8KNMV8bY95yOovTjDGxxpiFxpjNNX8jQ53O5CRjzJ9qPidZxpjXjTENnM7kbX5R1KdtoPszoAdwvTGmh7OpHFUF3GWt7Q4MAX4b4scD4A4g1+kQfmI2sNpa2w3oQwgfF2NMW+APQKq1thfVSzFf52wq7/OLoua0DXSttRXANxvohiRr7UFr7caar4up/iC2dTaVc4wx7YBRwFynszjNGNMYuAj4B4C1tsJae8LRUM6rB0QZY+oB0QThDlT+UtRn20A3ZIvpdMaYRKAfsN7hKE56FrgbcDucwx8kAQXAvJpTQXONMTFOh3KKtXY/8DSwBzgIFFpr33U2lff5S1F7tIFuqDHGNAQWAX+01hY5nccJxpjRQL619iuns/iJekB/4AVrbT/gJBCyczrGmKZU/+u7I9AGiDHGTHI2lff5S1FrA90zGGMiqC7p+dbaxU7ncdAwYIwxZhfVp8R+aoz5p7ORHLUP2Get/eZfWAupLu5QdRmw01pbYK2tBBYDFzicyev8pai1ge5pjDGG6nOQudbaPzudx0nW2mnW2nbW2kSq/y4+sNYG3YjJU9baQ8BeY0xyzY8uBXIcjOS0PcAQY0x0zefmUoJwctWjPRN9TRvofscw4EYg0xizqeZnaTV7V4r8HphfM6jZAdzscB7HWGvXG2MWAhupvlrqa4LwdnLdQi4i4uf85dSHiIh8DxW1iIifU1GLiPg5FbWIiJ9TUYuI+DkVtYiIn1NRi4j4uf8DQWe1P85DIAYAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Time Cost 44.27845478057861\n",
      "Loss 2.245773288724677 Error 0.990069238846126 Normalized Error 1.2254114398785507\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAD4CAYAAADFAawfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAJBklEQVR4nO3d0Ytmh1nH8d/jbopaG5uQF5GmcRUkUAqaMkQkUDCKpCp640ULCkphblQqCFKvWv8B0QsRlhorWFukWpBSqwUNpVCjs22UpNtCCS1datk37KqtF4bUx4uZTbabSedsOmfmSebzgWFn5j2887v67uFwzkx1dwCY67tOewAA355QAwwn1ADDCTXAcEINMNz5Nd70nnvu6QsXLqzx1gCvSpcuXXqmuzeHvbZKqC9cuJC9vb013hrgVamqvvxSr7n0ATCcUAMMJ9QAwwk1wHBCDTCcUAMMJ9QAwwk1wHCrPPACJ6GqTuxn+b3tnCah5hXr5cSzqkSXVxyXPgCGE2qA4YQaYDihBhhOqAGGE2qA4YQaYLhFoa6q11fVh6vq81V1uap+cu1hAOxb+sDLHyX5eHf/clW9Jsn3rrgJgJscGeqqujPJW5P8WpJ097NJnl13FgA3LLn08SNJtkn+rKo+W1Xvq6rX3npQVe1W1V5V7W2322MfCnBWLQn1+SRvSfIn3f1Akv9J8u5bD+rui9290907m82hf/EcgJdhSaivJLnS3Y8ffP3h7IcbgBNwZKi7+2tJvlJV9x9866eTfG7VVQA8b+ldH7+V5AMHd3w8neTX15sEwM0Whbq7n0iys+4UAA7jyUSA4YQaYDihBhhOqAGGE2qA4YQaYDihBhhOqAGGE2qA4YQaYDihBhhOqAGGE2qA4YQaYDihBhhOqAGGE2qA4YQaYDihBhhOqAGGE2qA4YQaYLjzSw6qqi8l+XqSbyZ5rrt31hwFwAsWhfrAT3X3M6stAeBQLn0AD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mrPi/UkeOe0R8HIINWdCd38yybXT3gEvh1ADDCfUAMMJNcBwQg0wnFBzJlTVB5N8Osn9VXWlqt552ptgKY+QAwznjBpgOKEGGE6oAYYTaoDhhBpgOKEGGE6oAYb7f3lCrtW2blrxAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Tuning Hyperparameters\n",
    "# SPO+\n",
    "alg = 'SPO'\n",
    "print(\"Method SPO+\")\n",
    "print(\"Training samples\", N_train)\n",
    "start = time.time()\n",
    "globals()[\"Theta_\"+alg] = lm.SPOplus(A = A_train, b = b_train, c = c_train, z = z_train, \n",
    "                                     regular_const = 1e-2, step_size = 1e-1, batch_size = 5, max_iter = 1e3, \n",
    "                                     solved = True, solution = solution_train)\n",
    "globals()[\"time_\"+alg] = time.time() - start\n",
    "print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = z_test, direct = False,\n",
    "                                                                                                Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "plt.boxplot(globals()[\"loss_\"+alg], showfliers = False)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "53204ae2",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Method Naive OGD\n",
      "Training samples 500\n",
      "Time Cost 0.006976127624511719\n",
      "Loss 1.8388770292478134 Error 2.0838786030458283 Normalized Error 1.4042543516428285\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgA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
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Tuning Hyperparameters\n",
    "# Naive Online Gradient Descent\n",
    "# Do not need true c\n",
    "alg = 'NOGD'\n",
    "print(\"Method Naive OGD\")\n",
    "print(\"Training samples\", N_train)\n",
    "start = time.time()\n",
    "globals()[\"Theta_\"+alg] = lm.NaiveOnlineGradientDescent(A = A_train, b = b_train, z = z_train, \n",
    "                                                        step_size = 1e-3, solution = solution_train, radius = 50)\n",
    "globals()[\"time_\"+alg] = time.time() - start\n",
    "print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = z_test, direct = False,\n",
    "                                                                                                Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "plt.boxplot(globals()[\"loss_\"+alg], showfliers = False)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "5448e80f",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Method SVM OGD\n",
      "Training samples 1000\n",
      "Time Cost 0.0670003890991211\n",
      "Loss 0.38048191031371514 Error 0.9994669064078309 Normalized Error 1.3105632225268369\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAALZUlEQVR4nO3dQYic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tJVpK8OOV4knx2/fjrST4y/1ElSZuZGfQke4BzwAngGHA6ybGJZSeAo+uvM8AX5jynJGmGIVfoTwErVXWzqu4Bl4CTE2tOAl+qB14DHkvy/jnPKknaxJCgHwBujW2vru/b6hqSnEmynGR5bW1tq7NK25Jky6/tfJ+0aEOCPu136uQjdEPWUFUXqmpUVaOlpaUh80nvWVXtyktatCFBXwUOjW0fBG5vY40kaQcNCfo14GiSI0keAU4BlyfWXAaeXf9pl48C36uq7855VknSJmZ+OFdV3U9yFrgK7AEuVtWNJM+vHz8PXAGeAVaAHwDP7dzIkqRpBn3aYlVd4UG0x/edH/u6gBfmO5okaSt8UlSSmjDoktSEQZekJgy6JDWRRT0QkWQN+PZCTi7Nth94Z9FDSFP8elVNfTJzYUGXfpolWa6q0aLnkLbCWy6S1IRBl6QmDLo03YVFDyBtlffQJakJr9AlqQmDLklNGHRpTJKLSd5O8saiZ5G2yqBLP+5l4Piih5C2w6BLY6rqVeDOoueQtsOgS1ITBl2SmjDoktSEQZekJgy6NCbJl4H/Aj6YZDXJJxc9kzSUj/5LUhNeoUtSEwZdkpow6JLUhEGXpCYMuiQ1YdAlqQmDLklN/B8N4skBxSbl6gAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Tuning Hyperparameters\n",
    "# SVM Margin Online Gradient Descent\n",
    "# Do not need true c\n",
    "# Do not need solution x but basis\n",
    "alg = 'SVMOGD'\n",
    "print(\"Method SVM OGD\")\n",
    "print(\"Training samples\", N_train)\n",
    "start = time.time()\n",
    "globals()[\"Theta_\"+alg] = lm.SVM_OGD(A = A_train, b = b_train, z = z_train, basic = basic_train, nonb = nonb_train,\n",
    "                                     step_size = 1e-4, radius = 1.1* np.linalg.norm(Coeff_Mat, 'f'), regular_const=1e-2)\n",
    "globals()[\"time_\"+alg] = time.time() - start\n",
    "print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = z_test, direct = False,\n",
    "                                                                                                Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "plt.boxplot(globals()[\"loss_\"+alg], showfliers = False)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "0bae000d",
   "metadata": {},
   "outputs": [],
   "source": [
    "focus = \"degree\"\n",
    "globals()[focus + \"_set\"] = [1, 2, 4, 6]\n",
    "total_trial = 10\n",
    "methods = ['RF', 'OLS', 'Ridge', 'PolyRidge', 'RbfRidge', 'SPO+', 'ML', 'PolyKer', 'ExpRbf']\n",
    "for i in range(len(methods)):\n",
    "    globals()[f\"Loss_{methods[i]}\"] = np.zeros((total_trial, len(globals()[focus + \"_set\"])))\n",
    "    globals()[f\"Error_{methods[i]}\"] = np.zeros((total_trial, len(globals()[focus + \"_set\"])))\n",
    "    globals()[f\"Norm_Err_{methods[i]}\"] = np.zeros((total_trial, len(globals()[focus + \"_set\"])))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "id": "01bf6e90",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "*********************************************************\n",
      "Trial 1\n",
      "Time cost 3.4190027713775635\n",
      "Method Random Forest\n",
      "Training samples 500\n",
      "Time Cost 0.2590024471282959\n",
      "Loss 0.0689308523104141 Error 1.443655829147477 Normalized Error 0.3303979131814035\n",
      "Method Ordinary Least Squares\n",
      "Training samples 500\n",
      "Time Cost 1.4760019779205322\n",
      "Loss 0.13816068558522887 Error 13.759772708440257 Normalized Error 0.688204832367662\n",
      "Method Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 1.4460008144378662\n",
      "Loss 0.13816068558522887 Error 13.75941895862375 Normalized Error 0.688203448505963\n",
      "Method PolyKer Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 15.01000428199768\n",
      "Loss 0.1427749076125836 Error 13.875202401612075 Normalized Error 0.7306334410565074\n",
      "Method RbfKer Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 14.918329000473022\n",
      "Loss 0.1214197130701705 Error 0.6936184875990519 Normalized Error 0.3500908247613355\n",
      "Method SPO+\n",
      "Training samples 500\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD4CAYAAADiry33AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAZRUlEQVR4nO3dbYxc133f8e9vn/iwpEWJu6RUPmipeMVWKSxLWFByldpSUxuUE4dIERQUUhswbBAKpNYJgrRKXthA+9Jt0DpWTBAOo7q1pRe2lBAFLclogyqNIYNLRdGjZ7iiKHNN7nBJStQsn5bL/ffF3KVGq9mdu7uzvDN3fh9gwZl7zr3znyH54+W5Z+5RRGBmZvnVkXUBZma2vBz0ZmY556A3M8s5B72ZWc456M3Mcq4r6wJq6evri4GBgazLMDNrGYcPHz4dEf212poy6AcGBhgeHs66DDOzliHpnbnaPHRjZpZzDnozs5xz0JuZ5ZyD3sws5xz0ZmY556A3M8u5ukEvaYukv5H0pqTXJX2tRh9J+pakEUmvSLq7qm2npELS9lij34CZmc0vzTz6KeAPI+IlSWuBw5J+EhFvVPV5EBhMfu4BvgPcI6kTeBz4LDAKHJJ0YNa+ufO/3yxx5vxkus4LvEt0LGCHenegTnOk+seof5RG1FHvIA15L9fjNRb52mleY67fi1r953u1+UpZyGukUfczT3Hcel3SHWP560hzoNUrunj4M7+S5kgLUjfoI+IkcDJ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4NPAXwBExGREvJdpUdnrAlZJ6gJWk8NV8PIS9KkXIW83kgaAu4CfZVxKlv4r8O+B6YzraAa3AePAXyZDWd+V1Jt1UVmJiF8C/xn4BXCSyup4z2dbVePlJehTL0LeTiStAX4E/H5EvJ91PVmQ9JvAqYg4nHUtTaILuBv4TkTcBZwH2vaalqQbqfzvfxvwj4BeSf8m26oaLy9Bn2YB87YiqZtKyH8/Ip7Oup4M3Qf8lqRjVIb0/oWk/5ltSZkaBUYjYuZ/eD+kEvzt6l8Cb0fEeERcAZ4G/lnGNTVcXoLei5BXkSQqY7BvRsSfZl1PliLijyNic0QMUPlz8X8iIndnbGlFxBhwXNL2ZNOvA29kWFLWfgHcK2l18vfm18nhxem6i4O3Ai9C/hH3AV8EXpX0crLtTyLiYHYlWRP5t8D3k5Oio8CXM64nMxHxM0k/BF6iMlvt78nh7RB8CwQzs5zLy9CNmZnNwUFvZpZzDnozs5xz0JuZ5ZyD3sws5xz0ZmY556A3M8u5/w98OlFFVtQT2AAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Time Cost 31.524288654327393\n",
      "Loss 0.10720292338361422 Error 36.52404765074688 Normalized Error 1.3978091162864417\n",
      "Method SVM Margin Learning\n",
      "Training samples 500\n",
      "Time Cost 1.3942339420318604\n",
      "Loss 0.06383240379917424 Error 1.261525883004714 Normalized Error 1.1105474850041555\n",
      "Method Poly-Kernelized SVM Margin Learning\n",
      "Training samples 500\n",
      "Time Cost 51.69140386581421\n",
      "Loss 0.002577171708081382 Error 1.6071377065676906 Normalized Error 0.9108751050236342\n",
      "Method Rbf Kernelized SVM Margin Learning\n",
      "Training samples 500\n",
      "Time Cost 48.36937880516052\n",
      "Loss 0.01180816935742315 Error 1.272954832573912 Normalized Error 0.9663872901243747\n",
      "*********************************************************\n",
      "Trial 2\n",
      "Time cost 3.2350001335144043\n",
      "Method Random Forest\n",
      "Training samples 500\n",
      "Time Cost 0.24700140953063965\n",
      "Loss 0.0712481482327115 Error 1.9380314486571049 Normalized Error 0.37566263196914496\n",
      "Method Ordinary Least Squares\n",
      "Training samples 500\n",
      "Time Cost 1.5013422966003418\n",
      "Loss 0.25489212395279676 Error 16.890987882778102 Normalized Error 0.7877053210372571\n",
      "Method Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 1.5100042819976807\n",
      "Loss 0.25489212395279676 Error 16.890574010115362 Normalized Error 0.7877051259254751\n",
      "Method PolyKer Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 14.847995042800903\n",
      "Loss 0.14443290648417131 Error 20.29913534112407 Normalized Error 0.8295179704362144\n",
      "Method RbfKer Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 15.052000999450684\n",
      "Loss 0.11247162625231753 Error 0.7910280786082026 Normalized Error 0.40001394795412387\n",
      "Method SPO+\n",
      "Training samples 500\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAD4CAYAAADFAawfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAR70lEQVR4nO3dW2wc53nG8efl8iQeZB24lBzJNi2bYhMEcB0QRlqhLuoEhdME6V3hAMlFUUAokLROkSJoetf7NkgviqKCk7ZA3ASt7QCBkaYJkBhBgNYtZTutHWWHsi3bkrXDpWRJs6R4fnuxS+pEmUtrl/PNzP8HCKbI1erxmno8+vad7zN3FwAgXF1pBwAAvD+KGgACR1EDQOAoagAIHEUNAIHr7sSTjoyM+NjYWCeeGgBy6eTJk7PuXt7sax0p6rGxMU1NTXXiqQEgl8zsrdt9jaUPAAgcRQ0AgaOoASBwFDUABI6iBoDAUdQAEDiKGgAC19IctZmdkZRIWpW04u6T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pYO0C0aMxuS9KykL7v7lbTzpMHMPiNpxt1Ppp0lEN2SPibp7939YUlzkgr7no6Z7VXjb9/3S/qQpEEz+3y6qdovlKLmAN2bmFmPGiX9tLs/l3aeFB2T9FkzO6PGkthjZvbtdCOl6qyks+6+/jesZ9Qo7qL6pKQ33b3m7suSnpP0mylnartQipoDdK9jZqbGGuQpd/962nnS5O5fc/fD7j6mxvfFT9w9d1dMrXL3qqR3zGyi+alPSPplipHS9rakj5vZQPPPzSeUwzdXWzozsdM4QPcWxyR9QdL/mdkrzc/9ZfPsSuBPJD3dvKh5Q9IfppwnNe7+opk9I+klNaalXlYObyfnFnIACFwoSx8AgNugqAEgcBQ1AASOogaAwFHUABA4ihoAAkdRA0Dg/h8cd0W7fhfuCgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Time Cost 31.648157119750977\n",
      "Loss 0.12891906332402447 Error 71.85730913051412 Normalized Error 1.4032277041952441\n",
      "Method SVM Margin Learning\n",
      "Training samples 500\n",
      "Time Cost 1.4260022640228271\n",
      "Loss 0.09535319610205831 Error 1.296713504246576 Normalized Error 1.1099457844393605\n",
      "Method Poly-Kernelized SVM Margin Learning\n",
      "Training samples 500\n",
      "Time Cost 57.59605145454407\n",
      "Loss 0.00209450525466644 Error 1.926647025536872 Normalized Error 0.9953458302848368\n",
      "Method Rbf Kernelized SVM Margin Learning\n",
      "Training samples 500\n",
      "Time Cost 52.72133278846741\n",
      "Loss 0.00747717052442394 Error 1.3276401166865779 Normalized Error 1.0245337919049315\n",
      "*********************************************************\n",
      "Trial 3\n",
      "Time cost 3.253002166748047\n",
      "Method Random Forest\n",
      "Training samples 500\n",
      "Time Cost 0.2610020637512207\n",
      "Loss 0.11077070927932095 Error 1.4309286966180383 Normalized Error 0.384316485020029\n",
      "Method Ordinary Least Squares\n",
      "Training samples 500\n",
      "Time Cost 1.4399986267089844\n",
      "Loss 0.3326689769050315 Error 16.147098903660783 Normalized Error 0.7932021938400446\n",
      "Method Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 1.4609973430633545\n",
      "Loss 0.3326689769050315 Error 16.146793640203814 Normalized Error 0.7932008735627336\n",
      "Method PolyKer Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 14.950653553009033\n",
      "Loss 0.18031412850251638 Error 16.2333849594068 Normalized Error 0.7323649182161449\n",
      "Method RbfKer Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 14.76431941986084\n",
      "Loss 0.16118762256014668 Error 1.4815238581381287 Normalized Error 0.3881378551359281\n",
      "Method SPO+\n",
      "Training samples 500\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAUxUlEQVR4nO3dfYwcd33H8c/3nny+Oxs79vrcxInPTs4HCFGFHlUgElQEqlAQVCpVEwmEKJJViUJAVDSUP/i3VREFqRWVlYQgEYU/QqpGiFIQD0KtaNTLAyXB2T1jTGKTnVvb2Jm9s31P3/6xu75n393u3M3+Zt4vKbrbmdmZ723sj+d+8535mbsLABCejrQLAAA0hwAHgEAR4AAQKAIcAAJFgANAoLq282D79+/3oaGh7TwkAATvmWeeOe/uheXLtzXAh4aGNDY2tp2HBIDgmdlvVlvOEAoABIoAB4BAEeAAECgCHAACRYADQKAIcAAIFAEOAIHa1j7w0D19+oL++9T52gszWe2LTFb/Wn9t1thk5br66wZbsp/66/r3NzyG6jtpbLtsX1q23cIya7xtYdmifS9su/hnWON9y+pYWG+LF61ex5L3LD3WkjpX1LWytsXbLz7u0vcsqnXZ8sXW2n7Fug3ud61aVq5d77225rrV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y9xt6SPSPqFmT1fX/Z39blJAUn6pKTH6ic7pyV9LOV6UuHuT5vZE5KeVa176zll8JZ6bqUHgECFMIQCAFgFAQ4AgSLAASBQBDgABIoAB4BAEeAAECgCHAAC9f+NVGvC3CXJ6gAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Time Cost 31.461053133010864\n",
      "Loss 0.31978589845000377 Error 206.86661387135038 Normalized Error 1.41112051345624\n",
      "Method SVM Margin Learning\n",
      "Training samples 500\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "Time Cost 1.4610002040863037\n",
      "Loss 0.28095078177935506 Error 1.5605842139524924 Normalized Error 1.183494199139257\n",
      "Method Poly-Kernelized SVM Margin Learning\n",
      "Training samples 500\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "Time Cost 55.421838998794556\n",
      "Loss 0.0021344893919895054 Error 2.3934327169011884 Normalized Error 0.9540581412721904\n",
      "Method Rbf Kernelized SVM Margin Learning\n",
      "Training samples 500\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "Time Cost 61.823360443115234\n",
      "Loss 0.01013387706335253 Error 1.8465697296336312 Normalized Error 1.03588069301481\n",
      "*********************************************************\n",
      "Trial 4\n",
      "Time cost 4.026000738143921\n",
      "Method Random Forest\n",
      "Training samples 500\n",
      "Time Cost 0.2689993381500244\n",
      "Loss 0.046548449906923396 Error 0.4482330831563088 Normalized Error 0.26451667470754675\n",
      "Method Ordinary Least Squares\n",
      "Training samples 500\n",
      "Time Cost 1.6210050582885742\n",
      "Loss 0.11900071693992519 Error 10.447585129862839 Normalized Error 0.8319253143941657\n",
      "Method Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 1.6159977912902832\n",
      "Loss 0.11900071693992519 Error 10.447221373505858 Normalized Error 0.8319252808430276\n",
      "Method PolyKer Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 18.395997047424316\n",
      "Loss 0.12549073329009036 Error 8.43568403879601 Normalized Error 0.7574395734167967\n",
      "Method RbfKer Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 18.615039825439453\n",
      "Loss 0.05853679718885003 Error 0.3218939896489951 Normalized Error 0.20254997447621348\n",
      "Method SPO+\n",
      "Training samples 500\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAASMElEQVR4nO3dbYwdV33H8d9/n59s/LDXm8ZOsjZZmyLUKtG2AiLRioBEC4JWRWqQQAhVilS1EBAShb7hbSshBC8qJCtAkYjgRYhUhBAF8aCqVRV1kyCRxNxZY0xikzt7bWNn7q738f77Yu/Guxsbr+/M7syZ+X4ka3fv3r3z98j787ln/meOubsAAOHpybsAAEB3CHAACBQBDgCBIsABIFAEOAAEqm8vDzY+Pu6Tk5N7eUgACN4zzzxzyd1r2x/f0wCfnJzUzMzMXh4SAIJnZr+52eNMoQBAoAhwAAgUAQ4AgSLAASBQBDgABIoAB4BAEeAAEKg97QMP3dPnLut/zl5K/0Jm6V8ifRWZyOCvgowV4Q7RBSihcP76gaM6Pj6a6WsS4Hfg8999Qb9sJKlDqwi/YAD21oP3HiDA87Ky1tavmi39/Z+/Uf/0njflXU4hsBlIcRlvjSqBAN+h85fmtbLmOjkxlncphUFIAPniIuYO1eNEknRyYl/OlQDAOgJ8h6JGoh6T3lhjBA6gGAjwHYrilibHRzXU35t3KQAgiQDfsShOdIrpEwAFQoDvwOLKms5fntcUAQ6gQAjwHTg711LbxQgcQKEQ4DsQdTpQTt3FBUwAxUGA70A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+ZYUp5ekvRWMxvp/N48rBJe0E21J+ZeYPPkLR6S9BFJvzCzn3ce++fO3qSAJH1c0hOdwc45SR/LuZ5cuPvTZvakpGe13r31nEq4pJ6l9AAQqBCmUAAAN0GAA0CgCHAACBQBDgCBIsABIFAEOAAEigAHgED9P/xdTxdDPxp6AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Time Cost 36.9726083278656\n",
      "Loss 0.09304491913940452 Error 50.71827266548626 Normalized Error 1.4063049695635363\n",
      "Method SVM Margin Learning\n",
      "Training samples 500\n",
      "Time Cost 1.6825668811798096\n",
      "Loss 0.05929171339819463 Error 1.0936044622593053 Normalized Error 1.065796544823387\n",
      "Method Poly-Kernelized SVM Margin Learning\n",
      "Training samples 500\n",
      "Time Cost 57.9434871673584\n",
      "Loss 0.0015264849139358155 Error 1.2425070021300448 Normalized Error 0.9575793679778498\n",
      "Method Rbf Kernelized SVM Margin Learning\n",
      "Training samples 500\n",
      "Time Cost 53.477463245391846\n",
      "Loss 0.00517532284812243 Error 1.1323685351077533 Normalized Error 1.0127356681789694\n",
      "*********************************************************\n",
      "Trial 5\n",
      "Time cost 3.371999740600586\n",
      "Method Random Forest\n",
      "Training samples 500\n",
      "Time Cost 0.251004695892334\n",
      "Loss 0.03005591474534912 Error 0.8659682602099941 Normalized Error 0.32001743590227083\n",
      "Method Ordinary Least Squares\n",
      "Training samples 500\n",
      "Time Cost 1.667062520980835\n",
      "Loss 0.1241723102513082 Error 6.619773750666726 Normalized Error 0.7474606284974893\n",
      "Method Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 1.5320017337799072\n",
      "Loss 0.1241723102513082 Error 6.619601735412245 Normalized Error 0.7474600212512791\n",
      "Method PolyKer Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 16.659167289733887\n",
      "Loss 0.10493737510980279 Error 6.082033834434018 Normalized Error 0.6789857267851516\n",
      "Method RbfKer Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 18.681763410568237\n",
      "Loss 0.1035751772335787 Error 0.4670968743771073 Normalized Error 0.2636477255629286\n",
      "Method SPO+\n",
      "Training samples 500\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD5CAYAAAAp8/5SAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAXpUlEQVR4nO3df3Ac533f8fcHv/gDRERRAEiJIkXZApEqnkp2MapdTVz/iD0Sq7GSjCcVp03c1DOMM3Zrt5lpnXQmbf/rTOu0TeWxhrFVxVNXTutYidrQttQ0M4qntmNKkW3J0h1oirIg6g6gfpAL8AcI4Ns/sKBA6EAc7g7cu93PawaDu93ndr84kh8unn3ueRQRmJlZfnVlXYCZmW0sB72ZWc456M3Mcs5Bb2aWcw56M7Occ9CbmeVcz1oNJD0I3ANMRsQ70m1/BIymTbYDb0TE7TVeewJIgHlgLiLG6ilqcHAw9u3bV09TMzMDnnzyyVMRMVRr35pBDzwE3A98eWlDRPz9pceSPgecvsLr3x8Rp+orddG+ffs4evToel5iZlZokl5cbd+aQR8RT0jat8qBBfwK8IGGqzMzsw3VbB/9zwPViBhfZX8Aj0l6UtKhJs9lZmYNqKfr5koOAg9fYf+dEXFS0jDwuKTnI+KJWg3T/wgOAezdu7fJsszMbEnDV/SSeoBfBv5otTYRcTL9Pgk8AtxxhbaHI2IsIsaGhmreTzAzswY003XzC8DzETFRa6ekfkkDS4+BDwPPNHE+MzNrwJpBL+lh4DvAqKQJSR9Pd93Him4bSTdIOpI+3Ql8W9IPgL8C/iwivtm60s3MrB71jLo5uMr2f1Rj20ngQPr4OHBbk/WZmVmTmr0ZaytEBA/9vxO8PjO7uE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8rDe3FTRAzV2tGWQd8MSUcjYizrOtqB34vL+f24nN+PN+X9vXDXjZlZzjnozcxyLo9BfzjrAtqI34vL+f24nN+PN+X6vchdH72ZmV0uj1f0Zma2TG6Cfq31a4tE0h5JfyHpOUnPSvp01jVlTVK3pL+W9L+zriVrkrZL+pqk59O/I+/JuqYsSfpn6b+TZyQ9LGlz1jW1Wi6Cvs71a4tkDvitiPgbwLuBTxb8/QD4NPBc1kW0if8MfDMifha4jQK/L5J2A/8UGIuId7A4E+992VbVerkIeupbv7YwIuKViHgqfZyw+A+55hKORSDpRuDvAV/MupasSfoZ4L3AlwAiYjYi3si0qOz1AFsk9QBbyeHiSHkJ+rrXpi0aSfuAdwLfy7iULP0n4F8ACxnX0Q7eBkwB/zXtyvqipP6si8pKRLwM/Afgp8ArLC6O9Fi2VbVeXoK+7rVpi0TSNuCPgc9ExJms68mCpHuAyYh4Muta2kQP8C7gCxHxTmAGKOw9LUnXsvjb/83ADUC/pH+YbVWtl5eg99q0K0jqZTHkvxIRX8+6ngzdCXxE0gkWu/Q+IOm/ZVtSpiaAiYhY+g3vaywGf1H9AvBCRExFxEXg68DfybimlstL0Nezfm1hSBKLfbDPRcTvZV1PliLityPixojYx+Lfi/8bEbm7YqtXRFSAlySNpps+CPw4w5Ky9lPg3ZK2pv9uPkgOb043tZRgu1ht/dqMy8rSncCvAj+S9HS67XfSpR/N/gnwlfSi6DgFXss5Ir4n6WvAUyyOVvtrcvgpWX8y1sws5/LSdWNmZqtw0JuZ5ZyD3sws5xz0ZmY556A3M8s5B72ZWc456M3Mcs5Bb2aWc/8fNGs5W6XwGo4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Time Cost 37.503313064575195\n",
      "Loss 0.06797789751639068 Error 42.80650316233366 Normalized Error 1.4071136812391047\n",
      "Method SVM Margin Learning\n",
      "Training samples 500\n",
      "Time Cost 1.5982375144958496\n",
      "Loss 0.09787555474182273 Error 1.0006298165658347 Normalized Error 1.1199003788183026\n",
      "Method Poly-Kernelized SVM Margin Learning\n",
      "Training samples 500\n",
      "Time Cost 66.46557784080505\n",
      "Loss 0.0005114258731349267 Error 1.030677248935447 Normalized Error 0.9459730986154984\n",
      "Method Rbf Kernelized SVM Margin Learning\n",
      "Training samples 500\n",
      "Time Cost 62.54811191558838\n",
      "Loss 0.002455171231771498 Error 1.0169680348979766 Normalized Error 1.0039682919835922\n",
      "*********************************************************\n",
      "Trial 6\n",
      "Time cost 4.458889007568359\n",
      "Method Random Forest\n",
      "Training samples 500\n",
      "Time Cost 0.3021819591522217\n",
      "Loss 0.0046324524607497366 Error 1.3792420230696538 Normalized Error 0.3893022940716713\n",
      "Method Ordinary Least Squares\n",
      "Training samples 500\n",
      "Time Cost 1.6201481819152832\n",
      "Loss 0.03083084245828605 Error 14.54245235636205 Normalized Error 0.8556510479881827\n",
      "Method Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 1.4964172840118408\n",
      "Loss 0.03083084245828605 Error 14.541929289861903 Normalized Error 0.8556508609882183\n",
      "Method PolyKer Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 18.808353662490845\n",
      "Loss 0.13108897718769416 Error 13.96443004278946 Normalized Error 0.7966833602843617\n",
      "Method RbfKer Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 18.459218502044678\n",
      "Loss 0.0989494773677113 Error 0.4754528926065624 Normalized Error 0.3028944444178061\n",
      "Method SPO+\n",
      "Training samples 500\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD4CAYAAADiry33AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAhvklEQVR4nO3df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SbmVWZ2TfN7PXgb+TmbNeUTWb2W8H/yStm9qiZFWW7pkwLRdDPcqLyKBkGfsfd3wbcBDwY8fcD4GPAa9kuYpH4LPBdd78SuJYIvy9mthL4z0Cru28kNeT6fdmtKvNCEfTMbqLyyHD34+6+J7ifJPWPPO1cvVFgZquA9wBfyHYt2WZmFcBtwBcB3P2cu5/OalHZlwcUm1keUEIIZ8ELS9DPehLyqDGzZmAT8HyWS8mmzwC/D4xmuY7FYB3QBfxd0JT1BTMrzXZR2eLux4BPA28Cx0nNgvf97FaVeWEJ+llPQh4lZlYGfAv4uLv3ZruebDCz9wKd7r4727UsEnnAZuDz7r4J6Acie03LzKpJffpfCzQCpWb2y9mtKvPCEvSahHwKM8snFfJfdffHsl1PFt0CvM/MDpNq0vsJM/uH7JaUVW1Am7uPfcL7Jqngj6qfBA65e5e7DwGPAW/Pck0ZF5agn81E5ZFhZkaqDfY1d//LbNeTTe7+R+6+yt2bSf1d/F93D90Z22y5ewdw1MzWB4vuBF7NYknZ9iZwk5mVBP83dxLCi9NpzRm7WMw0UXmWy8qmW4APAC+b2d5g2SeCOX5FfhP4anBSdBD4UJbryRp3f97MvgnsIdVb7UVCOByChkAQEQm5sDTdiIjIDBT0IiIhp6AXEQk5Bb2ISMgp6EVEQk5BLyIScgp6EZGQ+//R95jX3BqqUQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Time Cost 37.828362703323364\n",
      "Loss 0.03423658824950797 Error 32.42103268957668 Normalized Error 1.4060996116816695\n",
      "Method SVM Margin Learning\n",
      "Training samples 500\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "Time Cost 1.4178705215454102\n",
      "Loss 0.01332881510824886 Error 1.0704997557082618 Normalized Error 1.1277231112103214\n",
      "Method Poly-Kernelized SVM Margin Learning\n",
      "Training samples 500\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "Time Cost 55.89914870262146\n",
      "Loss 0.00024418326613160403 Error 1.7554356640677662 Normalized Error 1.0224141434559515\n",
      "Method Rbf Kernelized SVM Margin Learning\n",
      "Training samples 500\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "Time Cost 50.180410385131836\n",
      "Loss 0.0008356257272819741 Error 1.1328631210203954 Normalized Error 1.0763875784338484\n",
      "*********************************************************\n",
      "Trial 7\n",
      "Time cost 4.21696400642395\n",
      "Method Random Forest\n",
      "Training samples 500\n",
      "Time Cost 0.28757452964782715\n",
      "Loss 0.00342949576207983 Error 1.260502373278072 Normalized Error 0.3412356207381685\n",
      "Method Ordinary Least Squares\n",
      "Training samples 500\n",
      "Time Cost 1.6262741088867188\n",
      "Loss 0.013980550459908918 Error 18.35586753477275 Normalized Error 0.7911685660038874\n",
      "Method Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 1.6060853004455566\n",
      "Loss 0.013980550459908918 Error 18.355571813238758 Normalized Error 0.7911682375042597\n",
      "Method PolyKer Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 18.49332070350647\n",
      "Loss 0.21853017736402183 Error 28.713718636963733 Normalized Error 0.8625567494355564\n",
      "Method RbfKer Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 17.543073654174805\n",
      "Loss 0.1733921571826917 Error 0.9640839291113591 Normalized Error 0.40698740364812624\n",
      "Method SPO+\n",
      "Training samples 500\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAlC0lEQVR4nO3deXxU5b0/8M93ZpJMtgnZF8hCQhIW2cOqooC4VYtWrYJ1qfZS64biXdreX5d7a6v1utatRVxb961asVYFZVFEgqAsYSYQAiGQmRAgmUnIOs/vj0xiiAlkmcmZM+fzfr3ySnIyyfk4ks/ryTPPc44opUBERPpj0joAERENDAuciEinWOBERDrFAici0ikWOBGRTlmG8mRJSUkqJydnKE9JRKR7mzdvPqyUSu5+fEgLPCcnB8XFxUN5SiIi3RORfT0d5xQKEZFOscCJiHSKBU5EpFMscCIinWKBExHpFAuciEinWOBERDrFAu+HzfuOYPO+I1rHICICwALvl/9+ezuWvLAZ9U2tWkchImKB91VLmxd7qj2oqW/Gc5+Xax2HiIgF3lflh+vR0qYQE2HB8rVlqGts0ToSERkcC7yP7E43AOBXF41B7fEWPLN+r8aJiMjoWOB95KhywyTAwknDcf64NDy9bi+ONTRrHYuIDIwF3kcOpwc5idGwhplx54ICeJpbsXxtmdaxiMjAWOB95HC6UZAaCwAoTIvFRRMy8Nzn5ajxNGmcjIiM6pQFLiKZIvKJiJSIyA4RWeo7/lsRqRSRrb63CwMfVxuNLW0or6lHQWpM57E7zslHY0sb/rxmj4bJiMjI+jICbwVwl1JqDICZAG4RkbG+rz2klJrke3s/YCk1ttvlgVcBBWmxncfykmNw6eQReGHDPrjqGjVMR0RGdcoCV0odUkp95fvYDaAEwPBABwsmDt8KlMLU2BOOL52fjzavwuOf7NYiFhEZXL/mwEUkB8BkABt9h24VkW9E5BkRie/le5aISLGIF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288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Time Cost 38.03765392303467\n",
      "Loss 0.20581617817691467 Error 2.8073925649388123 Normalized Error 1.1862714412950532\n",
      "Method SVM Margin Learning\n",
      "Training samples 500\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "Time Cost 1.139000415802002\n",
      "Loss 0.04281904114612812 Error 1.5772856118816665 Normalized Error 1.183326734116147\n",
      "Method Poly-Kernelized SVM Margin Learning\n",
      "Training samples 500\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "Time Cost 30.41059947013855\n",
      "Loss 0.00014198667363062524 Error 1.603998060653996 Normalized Error 0.999584949876563\n",
      "Method Rbf Kernelized SVM Margin Learning\n",
      "Training samples 500\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Time Cost 31.520647048950195\n",
      "Loss 0.0003286697341352264 Error 1.5229527998261403 Normalized Error 1.1048518847729465\n",
      "*********************************************************\n",
      "Trial 8\n",
      "Time cost 4.212001800537109\n",
      "Method Random Forest\n",
      "Training samples 500\n",
      "Time Cost 0.29207563400268555\n",
      "Loss 0.004565462968127841 Error 1.3248412115383605 Normalized Error 0.35976903351992334\n",
      "Method Ordinary Least Squares\n",
      "Training samples 500\n",
      "Time Cost 1.5847809314727783\n",
      "Loss 0.045614245894478704 Error 9.555627711796511 Normalized Error 0.7565887493835166\n",
      "Method Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 1.544426679611206\n",
      "Loss 0.045614245894478704 Error 9.555363017982458 Normalized Error 0.756588373453018\n",
      "Method PolyKer Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 18.92702293395996\n",
      "Loss 0.14050801428896562 Error 9.764751975442595 Normalized Error 0.7584259252839272\n",
      "Method RbfKer Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 18.550423860549927\n",
      "Loss 0.09795096024747742 Error 0.5338397788894035 Normalized Error 0.30072266203369713\n",
      "Method SPO+\n",
      "Training samples 500\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb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w5twpYT4G+L2bWDHwS2OScW0Nmy+u7va0q/+Z8gDOLhyfPdc65o865XdmfJ8n85bzgHNJCYmYtwO8B3/C6Fq+ZWQ2wGfgmgHNu2Dl30tOivBUGys0sDFQQwBPD/BDgUzo8udCY2VJgA/Ccx6V47a+A+4G0x3XMBcuBBPDt7JTSN8ys0uuivOCcOwx8ETgIHAX6nXOPeVtV/vkhwKd0eHIhMbMq4EfAfc65U17X4xUzeyfQ65x73uta5ogwsBH4mnNuAzAAFOQzIzOrJ/M/9WXAIqDSzD7sbVX554cA1+HJ5zCzYjLh/bBz7sde1+OxG4A7zayLzNTarWb2996W5KluoNs5N/6/skfIBHohuh14zTmXcM6NAD8Grve4przzQ4Dr8OQsMzMy85t7nXNf8roerznnPuuca3HOLSXz5+IJ51zgRllT5ZzrAQ6Z2crspduAVzwsyUsHgWvNrCL79+Y2AvhAN6czMWeDDk+e5AbgI8BLZvZi9tqfZc8mFQH4BPBwdrBzAPgDj+vxhHPuOTN7BNhFpnvrBQK4pF5L6UVEfMoPUygiInIRCnAREZ9SgIuI+JQCXETEpxTgIiI+pQAXEfEpBbiIiE/9f9yHMH33wV7bAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Time Cost 37.47823667526245\n",
      "Loss 0.055671537986216116 Error 29.34173913815996 Normalized Error 1.403412945393033\n",
      "Method SVM Margin Learning\n",
      "Training samples 500\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "Time Cost 1.6541650295257568\n",
      "Loss 0.005367282267736548 Error 1.121783638110859 Normalized Error 1.182566217013523\n",
      "Method Poly-Kernelized SVM Margin Learning\n",
      "Training samples 500\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "Time Cost 71.66025400161743\n",
      "Loss 6.64047030908421e-05 Error 2.15240957972536 Normalized Error 1.0849374139843162\n",
      "Method Rbf Kernelized SVM Margin Learning\n",
      "Training samples 500\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "Time Cost 68.31369495391846\n",
      "Loss 0.0002891633861456485 Error 1.181897694673296 Normalized Error 1.1121982299494977\n",
      "*********************************************************\n",
      "Trial 9\n",
      "Time cost 4.209823131561279\n",
      "Method Random Forest\n",
      "Training samples 500\n",
      "Time Cost 0.27466392517089844\n",
      "Loss 0.04500189877023995 Error 0.7636948382393945 Normalized Error 0.27792438231369854\n",
      "Method Ordinary Least Squares\n",
      "Training samples 500\n",
      "Time Cost 1.646963357925415\n",
      "Loss 0.15725930495552012 Error 11.78646836166157 Normalized Error 0.7527964547998635\n",
      "Method Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 1.5621402263641357\n",
      "Loss 0.15725930495552012 Error 11.786139597270575 Normalized Error 0.7527966378714737\n",
      "Method PolyKer Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 18.455530881881714\n",
      "Loss 0.18074233245122856 Error 12.650846587606841 Normalized Error 0.766564581117765\n",
      "Method RbfKer Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 18.62482261657715\n",
      "Loss 0.08894480716009211 Error 0.46585187409420076 Normalized Error 0.25197066281299296\n",
      "Method SPO+\n",
      "Training samples 500\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD4CAYAAADiry33AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRw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lnIPezCzn8hj0x7IuoIX4WNzOx+N2Ph635PpY5G6M3szMbpfHM3ozM6vhoDczy7ncBP163oS81UnaJekvJf1I0huSfjfrmrImqVPS30r6P1nXkjVJmyV9U9KPk9+Rj2VdU5Yk/V7y7+R1Sc9J6sm6pmbLRdCv903I28A08O8i4ueBjwJfLPjxAPhd4EdZF9Ei/gfwYkT8I2AfBT4uknYAvwMMRcQvMrec+qFsq2q+XAQ963wT8lYXET+LiO8nj6vM/UOue6/eIpC0E/jnwNezriVrku4BPgH8T4CImIqIdzMtKntdwN2SuoCN5PAueHkJ+tQ3IS8aSYPALwF/k3EpWfrvwL8HZjOuoxU8AIwD/ysZyvq6pE1ZF5WViHgb+C/A3wM/Y+7ueC9nW1Xz5SXoU9+EvEgk9QLfAv5tRLyXdT1ZkPRpYCwiTmddS4voAh4GvhYRvwRMAoW9piXpXub+7/9+4IPAJkn/Ktuqmi8vQZ/mBuaFIqmbuZD/04j4dtb1ZOgR4F9IOs/ckN6vSPrf2ZaUqRFgJCLm/w/vm8wFf1H9M+AnETEeETeAbwP/NOOami4vQe+bkNeQJObGYH8UEf8t63qyFBF/EBE7I2KQud+L/xsRuTtjSysiRoG3JO1Nmn4V+GGGJWXt74GPStqY/Lv5VXJ4cbrhzcHbgW9CvsgjwOeAH0h6NWn7DxFxMruSrIX8G+BPk5Oic8DnM64nMxHxN5K+CXyfudlqf0sOl0PwEghmZjmXl6EbMzNbgoPezCznHPRmZjnnoDczyzkHvZlZzjnozcxyzkFvZpZz/x+uUlkq1CIdFgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Time Cost 37.25338959693909\n",
      "Loss 0.11773495197262068 Error 26.665664580572766 Normalized Error 1.3970986898741211\n",
      "Method SVM Margin Learning\n",
      "Training samples 500\n",
      "Time Cost 1.5055971145629883\n",
      "Loss 0.060427768590161544 Error 1.0792172036124328 Normalized Error 1.0867924606711235\n",
      "Method Poly-Kernelized SVM Margin Learning\n",
      "Training samples 500\n",
      "Time Cost 59.33259129524231\n",
      "Loss 0.0021612669730584166 Error 1.2997300846389057 Normalized Error 0.9692212813794135\n",
      "Method Rbf Kernelized SVM Margin Learning\n",
      "Training samples 500\n",
      "Time Cost 49.764418601989746\n",
      "Loss 0.007846290820052783 Error 1.1439076257437308 Normalized Error 1.0023783932007062\n",
      "*********************************************************\n",
      "Trial 10\n",
      "Time cost 4.32668399810791\n",
      "Method Random Forest\n",
      "Training samples 500\n",
      "Time Cost 0.28999948501586914\n",
      "Loss 0.10201830031014532 Error 1.6756046599365908 Normalized Error 0.3963186101412571\n",
      "Method Ordinary Least Squares\n",
      "Training samples 500\n",
      "Time Cost 1.6390018463134766\n",
      "Loss 0.3871561359043627 Error 31.159288672467273 Normalized Error 0.8005874083999975\n",
      "Method Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 1.606706142425537\n",
      "Loss 0.3871561359043627 Error 31.158615654622853 Normalized Error 0.8005858801180341\n",
      "Method PolyKer Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 18.76182270050049\n",
      "Loss 0.17415370096561364 Error 36.69250311535607 Normalized Error 0.7399128354353726\n",
      "Method RbfKer Ridge Regression\n",
      "Training samples 500\n",
      "Time Cost 18.757211446762085\n",
      "Loss 0.15898879373392782 Error 1.4520999436888682 Normalized Error 0.4031040912402086\n",
      "Method SPO+\n",
      "Training samples 500\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAD4CAYAAADFAawfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAATn0lEQVR4nO3dW2wc53nG8efd5Uk8WLLEpezIqukDxcYN4DggDKdGXdROC6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3Y+d7fdtauBD4t6ZnOSc0pSZ9MOE9i3P05M3tW0vNqz5Z6QTm8nZxbyAEg5dIy9AEAuAaKGgBSjqIGgJSjqAEg5ShqAEg5ihoAUo6iBoCU+3+OX/PNPwO7+gAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Time Cost 38.021010875701904\n",
      "Loss 0.35304703032502155 Error 273.300301604782 Normalized Error 1.4105390699842202\n",
      "Method SVM Margin Learning\n",
      "Training samples 500\n",
      "Time Cost 1.6060621738433838\n",
      "Loss 0.3265319935654879 Error 2.64368404952127 Normalized Error 1.1484513077635334\n",
      "Method Poly-Kernelized SVM Margin Learning\n",
      "Training samples 500\n",
      "Time Cost 62.685537338256836\n",
      "Loss 0.0026852320369299895 Error 4.0686356288297905 Normalized Error 0.9021007226271407\n",
      "Method Rbf Kernelized SVM Margin Learning\n",
      "Training samples 500\n",
      "Time Cost 61.24206495285034\n",
      "Loss 0.007033837675025522 Error 3.6381518030370144 Normalized Error 0.9827974228825014\n"
     ]
    }
   ],
   "source": [
    "for trial in range(total_trial):\n",
    "    # Generate Fractional Knapsack Samples\n",
    "    benchmark = 1\n",
    "    dim_features = 5\n",
    "    dim_decision = 10\n",
    "    price = np.random.randint(low=1, high=1000, size=dim_decision)\n",
    "    lower = np.amax(price)\n",
    "    upper = (np.random.rand()-1)*lower + np.sum(price)\n",
    "    Budget = [(upper-lower)*np.random.rand() + lower]\n",
    "    Coeff_Mat = np.random.binomial(n=1, p=0.5, size = (dim_decision, dim_features))\n",
    "    Theta_true = -np.concatenate((Coeff_Mat, np.zeros((dim_decision+1, dim_features))), axis=0)\n",
    "    print(\"*********************************************************\")\n",
    "    print(\"Trial\", trial + 1)\n",
    "    \n",
    "    N_train = 500\n",
    "    # N_valid = 200\n",
    "    N_test = 1000\n",
    "    degree = 6\n",
    "    additive_noise = 0.0\n",
    "    scale_noise_uni = 0.0\n",
    "    scale_noise_div = 0.0\n",
    "    attack_threshold = None\n",
    "    attack_power = 0.0\n",
    "    z_train, c_train, A_train, b_train = dg.GenerateFractionalKnapsack(N_samples=N_train, dim_features=dim_features, dim_decision=dim_decision, Coeff_Mat=Coeff_Mat, price=price, Budget=Budget,\n",
    "                                        degree=degree, additive_noise=additive_noise, scale_noise_uni=scale_noise_uni, scale_noise_div=scale_noise_div, attack_threshold = attack_threshold, attack_power = attack_power)\n",
    "    # z_valid, c_valid, A_valid, b_valid = dg.GenerateFractionalKnapsack(N_samples=N_valid, dim_features=dim_features, dim_decision=dim_decision, Coeff_Mat=Coeff_Mat, price=price, Budget=Budget,\n",
    "    #                                     degree=degree, additive_noise=additive_noise, scale_noise_uni=scale_noise_uni, scale_noise_div=scale_noise_div, attack_threshold = attack_threshold, attack_power = attack_power)\n",
    "    z_test, c_test, A_test, b_test = dg.GenerateFractionalKnapsack(N_samples=N_test, dim_features=dim_features, dim_decision=dim_decision, Coeff_Mat=Coeff_Mat, price=price, Budget=Budget,\n",
    "                                        degree=degree, additive_noise=additive_noise, scale_noise_uni=scale_noise_uni, scale_noise_div=scale_noise_div, attack_threshold = attack_threshold, attack_power = attack_power)\n",
    "    # Compute Optimal Solutions\n",
    "    start = time.time()\n",
    "    basic_train, nonb_train, solution_train = lpm.ComputeBasis(c=c_train, A=A_train, b=b_train)\n",
    "    #basic_valid, nonb_valid, solution_valid = lpm.ComputeBasis(c=c_valid, A=A_valid, b=b_valid)\n",
    "    basic_test, nonb_test, solution_test = lpm.ComputeBasis(c=c_test, A=A_test, b=b_test)\n",
    "    print(\"Time cost\", time.time() - start)\n",
    "    \n",
    "    \n",
    "    # Random Forest\n",
    "    # No Theta, directly predict c\n",
    "    alg = 'RF'\n",
    "    print(\"Method Random Forest\")\n",
    "    print(\"Training samples\", N_train)\n",
    "    start = time.time()\n",
    "    regr = RandomForestRegressor(random_state=0)\n",
    "    regr.fit(z_train, c_train)\n",
    "    hat_c = regr.predict(z_test)\n",
    "    globals()[\"time_\"+alg] = time.time() - start\n",
    "    print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "    globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark, A=A_test, b=b_test, c=c_test, z=z_test,\n",
    "                                                                                             direct=True, hat_c=hat_c, solved = True, solution=solution_test)\n",
    "    print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "    mark = 0\n",
    "    for j in range(len(globals()[focus + \"_set\"])):\n",
    "        if globals()[focus] == globals()[focus + \"_set\"][j]:\n",
    "            mark = j\n",
    "    globals()[\"Loss_\" + alg][trial][mark] = np.average(globals()[\"loss_\" + alg])\n",
    "    globals()[\"Error_\" + alg][trial][mark] = np.average(globals()[\"error_\" + alg])\n",
    "    globals()[\"Norm_Err_\" + alg][trial][mark] = np.average(globals()[\"norm_err_\" + alg])\n",
    "    \n",
    "    \n",
    "    # Ordinary Least Squares\n",
    "    alg = 'OLS'\n",
    "    print(\"Method Ordinary Least Squares\")\n",
    "    print(\"Training samples\", N_train)\n",
    "    start = time.time()\n",
    "    globals()[\"Theta_\"+alg] = lm.OrdinaryLeastSquares(A = A_train, b = b_train, c = c_train, z = z_train)\n",
    "    globals()[\"time_\"+alg] = time.time() - start\n",
    "    print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "    globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = z_test, direct = False,\n",
    "                                                                                                    Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "    print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "    mark = 0\n",
    "    for j in range(len(globals()[focus + \"_set\"])):\n",
    "        if globals()[focus] == globals()[focus + \"_set\"][j]:\n",
    "            mark = j\n",
    "    globals()[\"Loss_\" + alg][trial][mark] = np.average(globals()[\"loss_\" + alg])\n",
    "    globals()[\"Error_\" + alg][trial][mark] = np.average(globals()[\"error_\" + alg])\n",
    "    globals()[\"Norm_Err_\" + alg][trial][mark] = np.average(globals()[\"norm_err_\" + alg])\n",
    "    \n",
    "    \n",
    "    # Ridge Regression\n",
    "    alg = 'Ridge'\n",
    "    print(\"Method Ridge Regression\")\n",
    "    print(\"Training samples\", N_train)\n",
    "    start = time.time()\n",
    "    globals()[\"Theta_\"+alg] = lm.RidgeRegression(A = A_train, b = b_train, c = c_train,  z = z_train, regular_const = 1e-2)\n",
    "    globals()[\"time_\"+alg] = time.time() - start\n",
    "    print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "    globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = z_test, direct = False,\n",
    "                                                                                                    Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "    print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "    mark = 0\n",
    "    for j in range(len(globals()[focus + \"_set\"])):\n",
    "        if globals()[focus] == globals()[focus + \"_set\"][j]:\n",
    "            mark = j\n",
    "    globals()[\"Loss_\" + alg][trial][mark] = np.average(globals()[\"loss_\" + alg])\n",
    "    globals()[\"Error_\" + alg][trial][mark] = np.average(globals()[\"error_\" + alg])\n",
    "    globals()[\"Norm_Err_\" + alg][trial][mark] = np.average(globals()[\"norm_err_\" + alg])\n",
    "    \n",
    "    \n",
    "    # Polynomial Kernelized Ridge Regression\n",
    "    alg = 'PolyRidge'\n",
    "    print(\"Method PolyKer Ridge Regression\")\n",
    "    print(\"Training samples\", N_train)\n",
    "    ker_z_train = lm.PolyKernel(z = z_train, benchmark_z = z_train, gamma=1.0, degree=2, coef0=1.0)\n",
    "    ker_z_test = lm.PolyKernel(z = z_test, benchmark_z = z_train, gamma=1.0, degree=2, coef0=1.0)\n",
    "    start = time.time()\n",
    "    globals()[\"Theta_\"+alg] = lm.RidgeRegression(A = A_train, b = b_train, c = c_train,  z = ker_z_train, regular_const = 1e-2)\n",
    "    globals()[\"time_\"+alg] = time.time() - start\n",
    "    print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "    globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = ker_z_test, direct = False,\n",
    "                                                                                                    Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "    print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "    mark = 0\n",
    "    for j in range(len(globals()[focus + \"_set\"])):\n",
    "        if globals()[focus] == globals()[focus + \"_set\"][j]:\n",
    "            mark = j\n",
    "    globals()[\"Loss_\" + alg][trial][mark] = np.average(globals()[\"loss_\" + alg])\n",
    "    globals()[\"Error_\" + alg][trial][mark] = np.average(globals()[\"error_\" + alg])\n",
    "    globals()[\"Norm_Err_\" + alg][trial][mark] = np.average(globals()[\"norm_err_\" + alg])\n",
    "    \n",
    "    \n",
    "    # Rbf Kernelized Ridge Regression\n",
    "    alg = 'RbfRidge'\n",
    "    print(\"Method RbfKer Ridge Regression\")\n",
    "    print(\"Training samples\", N_train)\n",
    "    ker_z_train = lm.ExpKernel(z = z_train, benchmark_z = z_train, gamma=1e0)\n",
    "    ker_z_test = lm.ExpKernel(z = z_test, benchmark_z = z_train, gamma=1e0)\n",
    "    start = time.time()\n",
    "    globals()[\"Theta_\"+alg] = lm.RidgeRegression(A = A_train, b = b_train, c = c_train,  z = ker_z_train, regular_const = 1e-2)\n",
    "    globals()[\"time_\"+alg] = time.time() - start\n",
    "    print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "    globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = ker_z_test, direct = False,\n",
    "                                                                                                    Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "    print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "    mark = 0\n",
    "    for j in range(len(globals()[focus + \"_set\"])):\n",
    "        if globals()[focus] == globals()[focus + \"_set\"][j]:\n",
    "            mark = j\n",
    "    globals()[\"Loss_\" + alg][trial][mark] = np.average(globals()[\"loss_\" + alg])\n",
    "    globals()[\"Error_\" + alg][trial][mark] = np.average(globals()[\"error_\" + alg])\n",
    "    globals()[\"Norm_Err_\" + alg][trial][mark] = np.average(globals()[\"norm_err_\" + alg])\n",
    "    \n",
    "    # SPO+\n",
    "    alg = 'SPO+'\n",
    "    print(\"Method SPO+\")\n",
    "    print(\"Training samples\", N_train)\n",
    "    start = time.time()\n",
    "    globals()[\"Theta_\"+alg] = lm.SPOplus(A = A_train, b = b_train, c = c_train, z = z_train, \n",
    "                                         regular_const = 1e-4, step_size = 1e-1, batch_size = 5, max_iter = 1e3, \n",
    "                                         solved = True, solution = solution_train)\n",
    "    globals()[\"time_\"+alg] = time.time() - start\n",
    "    print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "    globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = z_test, direct = False,\n",
    "                                                                                                    Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "    print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "    mark = 0\n",
    "    for j in range(len(globals()[focus + \"_set\"])):\n",
    "        if globals()[focus] == globals()[focus + \"_set\"][j]:\n",
    "            mark = j\n",
    "    globals()[\"Loss_\" + alg][trial][mark] = np.average(globals()[\"loss_\" + alg])\n",
    "    globals()[\"Error_\" + alg][trial][mark] = np.average(globals()[\"error_\" + alg])\n",
    "    globals()[\"Norm_Err_\" + alg][trial][mark] = np.average(globals()[\"norm_err_\" + alg])\n",
    "    \n",
    "    \n",
    "    # Margin Learning\n",
    "    # Do not need true c\n",
    "    # Do not need solution x but basis\n",
    "    alg = 'ML'\n",
    "    print(\"Method SVM Margin Learning\")\n",
    "    print(\"Training samples\", N_train)\n",
    "    start = time.time()\n",
    "    globals()[\"Theta_\"+alg] = lm.MarginLearning(A = A_train, b = b_train, z = z_train, basic = basic_train, nonb = nonb_train, \n",
    "                                                regular_const = 1e-2)\n",
    "    globals()[\"time_\"+alg] = time.time() - start\n",
    "    print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "    globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = z_test, direct = False,\n",
    "                                                                                                    Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "    print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "    mark = 0\n",
    "    for j in range(len(globals()[focus + \"_set\"])):\n",
    "        if globals()[focus] == globals()[focus + \"_set\"][j]:\n",
    "            mark = j\n",
    "    globals()[\"Loss_\" + alg][trial][mark] = np.average(globals()[\"loss_\" + alg])\n",
    "    globals()[\"Error_\" + alg][trial][mark] = np.average(globals()[\"error_\" + alg])\n",
    "    globals()[\"Norm_Err_\" + alg][trial][mark] = np.average(globals()[\"norm_err_\" + alg])\n",
    "    \n",
    "    \n",
    "    # Polynomial Kernelized Margin Learning\n",
    "    # Do not need true c\n",
    "    # Do not need solution x but basis\n",
    "    alg = 'PolyKer'\n",
    "    ker_z_train = lm.PolyKernel(z = z_train, benchmark_z = z_train, gamma=1.0, degree=2, coef0=1.0)\n",
    "    ker_z_test = lm.PolyKernel(z = z_test, benchmark_z = z_train, gamma=1.0, degree=2, coef0=1.0)\n",
    "    print(\"Method Poly-Kernelized SVM Margin Learning\")\n",
    "    print(\"Training samples\", N_train)\n",
    "    start = time.time()\n",
    "    globals()[\"Theta_\"+alg] = lm.KernelizedMarginLearning(A = A_train, b = b_train, z = ker_z_train, basic = basic_train, nonb = nonb_train,\n",
    "                                                          regular_const=1e-1)\n",
    "    globals()[\"time_\"+alg] = time.time() - start\n",
    "    print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "    globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = ker_z_test, direct = False,\n",
    "                                                                                                    Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "    print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "    mark = 0\n",
    "    for j in range(len(globals()[focus + \"_set\"])):\n",
    "        if globals()[focus] == globals()[focus + \"_set\"][j]:\n",
    "            mark = j\n",
    "    globals()[\"Loss_\" + alg][trial][mark] = np.average(globals()[\"loss_\" + alg])\n",
    "    globals()[\"Error_\" + alg][trial][mark] = np.average(globals()[\"error_\" + alg])\n",
    "    globals()[\"Norm_Err_\" + alg][trial][mark] = np.average(globals()[\"norm_err_\" + alg])\n",
    "    \n",
    "    \n",
    "    # Rbf Kernelized Margin Learning\n",
    "    # Do not need true c\n",
    "    # Do not need solution x but basis\n",
    "    alg = 'ExpRbf'\n",
    "    ker_z_train = lm.ExpKernel(z = z_train, benchmark_z = z_train, gamma=1e0)\n",
    "    ker_z_test = lm.ExpKernel(z = z_test, benchmark_z = z_train, gamma=1e0)\n",
    "    print(\"Method Rbf Kernelized SVM Margin Learning\")\n",
    "    print(\"Training samples\", N_train)\n",
    "    start = time.time()\n",
    "    globals()[\"Theta_\"+alg] = lm.KernelizedMarginLearning(A = A_train, b = b_train, z = ker_z_train, basic = basic_train, nonb = nonb_train,\n",
    "                                                          regular_const=1e-2)\n",
    "    globals()[\"time_\"+alg] = time.time() - start\n",
    "    print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "    globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = ker_z_test, direct = False,\n",
    "                                                                                                    Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "    print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "    mark = 0\n",
    "    for j in range(len(globals()[focus + \"_set\"])):\n",
    "        if globals()[focus] == globals()[focus + \"_set\"][j]:\n",
    "            mark = j\n",
    "    globals()[\"Loss_\" + alg][trial][mark] = np.average(globals()[\"loss_\" + alg])\n",
    "    globals()[\"Error_\" + alg][trial][mark] = np.average(globals()[\"error_\" + alg])\n",
    "    globals()[\"Norm_Err_\" + alg][trial][mark] = np.average(globals()[\"norm_err_\" + alg])\n",
    "    \n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "d1caaea7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD4CAYAAADiry33AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG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O+1fYo/SCfzXYCxyrqldHXQjwG8DfVdVkVb0LPAb82nKdrK1B76bkDfTf+HwIOFFVfzjqegCSbEmyuf/9Rnp/IX44ypqq6veraqyqttP7Wfqrqlq22VdTSa7ov4lOf3nkXwAjvaqrql4BTiW5sX/oZmBkb+7PcDurYNmm78fATUk29f8e3kzvPbJlMXRz8LVoNW5KnuRrwD8Drk3SBb5UVQ+NsiZ6M9XPAT/or4kD/EFVHRldSVwP/En/6ojLgD+rqlVzOeMq81Hgz3s5wXrgv1bVX462JAA+D3y1P8l6EbhzxPWQZBO9q/D+7ahrAaiqJ5M8ChwDpoBnWcZbIbTy8kpJ0t9r69KNJKnPoJekljPoJanlDHpJajmDXpJazqCXpJYz6CWp5f4fundsxaqOwDQAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAPeElEQVR4nO3dX4xc5X3G8ecBA9nFjkzkjeUykE2zCDWqVGOtnLSWEC0lxWkUyEWkIAWhKpW5gCy0kVrKTdI7LhJSjVohOZjiqMQR5Y+CKpOCKIgiNZD1xoSlTrtbasiAay+ChjW2MGv/erFnyWo7u/N/zvzw9yOtduacOfM+Gq0fDu+cmdcRIQBAPueUHQAA0B4KHACSosABICkKHACSosABIKl1/Rxs06ZNMTo62s8hASC9AwcOvBkRIyu397XAR0dHNTk52c8hASA926/W284UCgAkRYEDQFIUOAAkRYEDQFIUOAAkRYEDQFIUOAAk1dfrwAH8WrVa1ezs7Kr7a7WaJKlSqdTdPzY2pomJiZ5kQw4UODCgTp48WXYEDDgKHChJo7P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JaLtDgz8ElJvyHpQttf7cVY2QqchZRbUMwzPyzpgYh4pOw8yxX/+/2MpGvLTaIdkr5YzDn/UNIf2P6HciNJEfFG8fuYpEe1OH1Yppqk2rL/Y3pIi4U+KHZKmoqIo2UHkfSHkv47IuYi4n1Jj0j6vV4MlK3AWUi5ScUbhnskHYqIu8vOI0m2R2xvLG4PafEP/RdlZoqIv4qISkSMavHv6V8ioidnS82yfWHxxrOKaYrPSSr1CqeI+B9Jv7R9ebHpakmlXjywwg0agOmTwmuSPmt7uPh3eLUW34Pquo7WxOy3QV1I2fY+SVdJ2mS7JumbEbGn3FTaIelGSS8Vc86SdGexjmlZtkjaW1wtcI6kByNiIC7bGzCbJT26+G9f6yT9ICJ+XG4kSdLXJT1QnDy9IulPSs4jSbI9rMUr024uO4skRcTzth+SNCVpQdLP1KOP1ae6jBAA8GvZplAAAAUKHACSosABICkKHACSosABICkKHACSosABIKn/A8YqdR45xIbOAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAATk0lEQVR4nO3df6zdd13H8ed77QbrNty0dzh7WzrTOl0IP+ahU4k6RaHFhQnRuKkYiKTOMApq4qaJEuMfaqIGbxg0zSiTqGsUpk4cDqPiNGSy28Gk3Rgcx1gPA3rnxrhdG7rbvf3jnM7D3fnxPfeee7/nfvp8JDe93/P5fM/3veX21c/9nM/3+4nMRJK09p1VdwGSpPEw0CWpEAa6JBXCQJekQhjoklSI9XVdeOPGjbl169a6Li9Ja9LBgwcfz8ypXm21BfrWrVuZnZ2t6/KStCZFxJf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BrokFcJAl6RC/B+3oEDr+xs6HgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# degree 1\n",
    "i = 0\n",
    "data_name = [\"Loss\", \"Error\", \"Norm_Err\"]\n",
    "for data in data_name:\n",
    "    tmp = np.zeros((total_trial, len(methods)))\n",
    "    for j in range(len(methods)):\n",
    "        tmp[:, j] = globals()[data+\"_\"+methods[j]].T[i]\n",
    "    np.savetxt(os.path.join('Rebuttal1_Degree', f\"{data}_degree_{degree_set[i]}\"), tmp)\n",
    "    sns.boxplot(data = tmp, showfliers = False)\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "id": "b31566f8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD4CAYAAADiry33AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAATM0lEQVR4nO3db4xcV3nH8e/jdUxsJ6kpWZLU4+BUa4JQ1ZZo5dBGoqE0KAZEeBnUgoiK3FSkJi1S/4FaVeJFXpCqWSnFsoxTUAsRBSJZlUNSqbXaqgr22iEiTgBvQxIP+eN14jh2bHDWfvpiZsNqM7t7Z3dn7+zx9yNZuzPnnnuftXd+vnPm3HsiM5EklWtF3QVIknrLoJekwhn0klQ4g16SCmfQS1LhVtZdQCeXX355bty4se4yJGnZOHDgwLHMHOzU1pdBv3HjRkZHR+suQ5KWjYh4ZqY2h24kqXAGvSQVzqCXpMIZ9JJUOINekgpn0EtS4Qx6SSpcX86jl9TfRkZGGBsb69jWbDYBaDQaM/YfGhpi27ZtPalNb2bQS1pUZ86cqbsETWPQS+rabGfjk20jIyNLVY7m4Bi9JBXOo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/9UZ8lOsBFZHxEpgDT1cfa/UoJ9psXLNICI2Au8BvldzKZNDJN8HjgL/npm11wT8A/DnwPma65gugYcj4kBEbK27GOBXgXHgvvYw186IWFt3UVPcCnyj7iIy86fAl4Bngedprcr3cK+OV2rQV16UXBARlwDfBu7MzFfrriczz2Xmb9JaY3hzRNQ61BURHwGOZuaBOuuYwQ2ZeR2wBfhMe4iwTiuB64AvZ+Z7gNeA2j8jA2gPI30U+Nc+qOWttEYZrgF+BVgbEX/Qq+OVGvRVFjQX0B4H/zbwL5n5nbrrmar9ln8vcHO9lXAD8NH2ePj9wO9GxD/XW1JLZj7X/noUeIDWsGWdmkBzyruwb9EK/n6wBTiYmS/WXQjwe8BPMnM8M18HvgP8dq8OVmrQuyh5Be0PPr8CPJmZf193PQARMRgR69rfr6b1gvhhnTVl5l9lZiMzN9L6XfqPzOzZ2VdVEbG2/SE67eGRDwK1zurKzBeAIxFxbfupDwC1fbg/zcfpg2GbtmeB90bEmvbr8AO0PiPriTkXB1+O+nFR8oj4BnAjcHlENIG/zcyv1FkTrTPVTwA/aI+JA/x1Zu6prySuAr7anh2xAvhmZvbNdMY+cwXwQCsnWAl8PTO/W29JAPwJ8C/tk6yngNtqroeIWENrFt4f1V0LQGZ+LyK+BRwEJoBH6eGtEIqcXilJ+oVSh24kSW0GvSQVzqCXpMIZ9JJUOINekgpn0EtS4Qx6SSrc/wNWKX6aM1V0GQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD4CAYAAAAXUaZHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAPTElEQVR4nO3dYYxldX3G8e/TXdFd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cJPuBf6uqm7prOGyvqid6jgX8pB++B7y1qjbqw5JryXEuC6/tC6rqmSQHgDur6pPD2F8rR+4/uSB3VT0HLF6Qu1dV9RXg8b5zDKqqo1V1b3f/SeABFq5522emqqofdw9f0X31ftSRZAz4LeCmvrOMsiSvAd4O3AxQVc+NSrF3LgH+q89iH7AV2JZkK7CdIV6hrpVyX+qC3L0W1maQZBfwZuBrPUdZnP64DzgO3FVVvWcC/hL4Y+D5nnO8UAFfSnKwu9B8334OmAP+tpvCuinJ6X2HGrAXuLXvEFX1PeDPgEeAo8APq+pLw9pfK+WeJcZ6P/IbZUleDXwW+FBV/ajvPFV1oqouZOF6u3uS9DqNleSdwPGqOthnjmVcVFVvAS4Hru2m//q0FXgL8ImqejPwFDAq73udBrwL+McRyHImCzMK5wM/C5ye5HeHtb9Wyt0Lcp+Ebl77s8CnqupzfecZ1P06/6/AZf0m4SLgXd389m3AryX5+34jLaiqx7rb48DtLExL9mkWmB34beszLJT9KLgcuLeqjvUdBPh14KGqmquq/wU+B/zKsHbWSrl7Qe5V6t68vBl4oKo+1ncegCQ7kry2u7+NhR+Cb/eZqaqur6qxqtrFwuvpX6pqaEdZq5Xk9O6NcLqpj3cAvZ6NVVX/DTya5I3d0CVAryczDLiaEZiS6TwCvC3J9u7n8BIW3vMaiqFdQ/VUGtULcie5FbgYOCvJLPCRqrq531RcBLwb+FY3xw3w4e6at33ZCezvzmr4GeBAVY3MqYcj5hzg9oVuYCvw6ar6Yr+RAPgA8Knu4Oo7wO/1nIck21k4g+59fWcBqKqvJfkMcC8wD3yDIf4ZgiZOhZQk/X+tTMtIkgZY7pLUIMtdkhpkuUtSgyx3SWqQ5S5JDbLcJalB/wf/NFZOWXni0wAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYA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He9j7g/9UZ5h02ApMRsRHYxCqu5raeA73SwtT6QRGxA/gx4K9qLuXs1MY3gKPAn2dm7TUBnwP+HXCm5jo6JfBnEXFfROypu5i2fwgsAL/bnp66KSIuqruoDtcBt9RdRGZ+B/hvwFPAM7RWc/uz1epvPQd6pYWp9fciYjPwVeA3MvPFuuvJzFcz80dprUF7dUTUOkUVER8EjmbmfXXW0cV7MvMqYDfw8fa0Xt02AlcBX8rMHwNOAuNyHet84OeB/zUGtbyR1szB5cAPAxdFxL9crf7Wc6C7MPUA2vPUXwV+PzNvr7ueTu2/qh8Crqm3Et4D/Hx7zvpW4L0R8T/qLQky8+n2n0eBP6Q13Vi3JtDs+FvVbbQCfhzsBu7PzL+ruxDgp4FvZeZCZr4C3A78s9XqbD0HepXFq8VrFyC/DDySmf+97noAImIqIra0v5+k9YP/t3XWlJn/PjMbmbmD1s/T/87MVRtNVRERF7UvZNOe0vgZoPY7qDLzu8CRiLii/dH7gFpvSOhwPWMw3dL2FPDjEbGp/f/h+2hdw1oVldYUHUfLLV5dc1lExC3ALmBrRDSBz2Tml+utivcAHwYebM9ZA/yH9lqxdbkU+L323QgbgD/IzLG4TXDMvBn4w1YWsBH4n5n5p/WW9JpPAL/fHlA9wRgsDh8Rm2jd+fav6q4FIDP/KiJuA+4HFoEHWMXXAKzb2xYlST9oPU+5SJI6GOiSVAgDXZIKYaBLUiEMdEkqhIEuSYUw0CWpEP8fEfeiGtuVhk4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# degree 2\n",
    "i = 1\n",
    "data_name = [\"Loss\", \"Error\", \"Norm_Err\"]\n",
    "for data in data_name:\n",
    "    tmp = np.zeros((total_trial, len(methods)))\n",
    "    for j in range(len(methods)):\n",
    "        tmp[:, j] = globals()[data+\"_\"+methods[j]].T[i]\n",
    "    np.savetxt(os.path.join('Rebuttal1_Degree', f\"{data}_degree_{degree_set[i]}\"), tmp)\n",
    "    sns.boxplot(data = tmp, showfliers = False)\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "id": "f0776ae6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAD4CAYAAADlwTGnAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAbu0lEQVR4nO3df4wc5Z3n8ffHAwSbHzI/jPFNe2Jv7AWhU0KikZ07TjlyXCKbRDGJxMrsHiEcuwYpXoe7RBdftNrLXfKHhSBZRuLwOuAs6BIckoAYRb4QxAbtrTYED8YJ/gFx4wXc9tgeDDZ2PGDG870/qobttHu6q2d6untcn5c06q566qnn26OZ/lY99VQ9igjMzCx/ZrQ7ADMzaw8nADOznHICMDPLKScAM7OccgIwM8ups9odQCMuvfTSWLBgQbvDMDObVp5//vk3ImJO5fpplQAWLFjAwMBAu8MwM5tWJL1Wbb27gMzMcsoJwMwsp5wAzMxyygnAzCynMiUAScskvSypKGltlfI/k/Tb9OefJH2kXl1JF0t6StLu9PWi5nwkMzPLom4CkNQF3AcsB64CbpJ0VcVm/wz8+4j4MPAtYEOGumuBpyNiMfB0umxmZi2S5QxgCVCMiD0RcRLYBKwo3yAi/iki3koXnwUKGequAB5K3z8E3DDhT2FmZg3Lch9AN7C3bLkELK2x/W3A/81Qd25EDAJExKCky6rtTNIqYBVAT09PhnA7U19fH8VicdzyUqkEQKFQqFq+aNEi1qxZ09K42hWTmbVGlgSgKuuqTiIg6ZMkCeDfNVp3PBGxgbRLqbe394ydvGB4eLjdIZymE2Mys+bJkgBKwPyy5QKwv3IjSR8GHgCWR8ThDHUPSpqXHv3PAw41Gvx0Uu9Ieay8r6+vFeGc1m6tslbHZGatkeUawBZgsaS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MAC8wRY+FyNUwUDMz+xd56wIyM7OUE4CZWU45AZiZ5ZQTgJlZTjkBmJnllBOAmVlOOQGYmeXU/wePw+z99WscvgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD4CAYAAAAXUaZHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAASOElEQVR4nO3dYYxd5X3n8e8POxCbJDKIgXUZqOnayi6JdjfRiKZFitC6aWAbAW+QjJTIalh5V2LjpLurLLQv0L5AirRVtx1pU8kCGq/KgliSCKtKskFuo7RSAx1D2Bic1LOhgQmOPREhIYCghv++mOPurHPHnrl37pzxw/cjWeee5znnnr/Gd373meeee06qCklSW87ruwBJ0uoz3CWpQYa7JDXIcJekBhnuktSgjX0XAHDJJZfUtm3b+i5Dks4phw4d+nFVTQzqWxfhvm3bNmZmZvouQ5LOKUl+sFSf0zKS1CDDXZIaZLhLUoMMd0lqkOEuSQ0y3CWpQYa7JDVoXZznLun/mZ6eZnZ2dsn+ubk5ACYnJwf2b9++nb17946lNp07DHfpHPPaa6/1XYLOAYa7tM6cbdR9qn96enotytE5yjl3SWqQ4S5JDTpruCe5L8mJJIcH9P3HJJXkkkVtdyaZTfK9JB9d7YIlSWe3nJH7F4DrT29McgXwEeC5RW1XA7uA93X7fD7JhlWpVJK0bGcN96r6JvDigK7/CnwWqEVtNwEPVtXrVfUsMAtcsxqFSpKWb6g59yQ3Aj+sqqdO67oceH7R+lzXJklaQys+FTLJZuD3gN8c1D2grQa0kWQPsAfgyiuvXGkZkqQzGGbk/o+Bq4CnkvwdMAk8keQfsTBSv2LRtpPAC4OepKr2VdVUVU1NTAy8S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ka4FPAN/p5rgBfre7521ftgL7u7MazgMeqqp1c+rhOnMZ8OWFbGAj8D+q6mv9lgTAp4D7u8HV94Hf7rkekmxm4Qy6f9N3LQBV9ViSh4EngJPAk4zxMgRNnAopSfr/tTItI0laxHCXpAYZ7pLUIMNdkhpkuEtSgwx3SWqQ4S5JDfq/w0yPdL+oKT4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAU3UlEQVR4nO3df4wc533f8fdXRxEiRdkszJPlcMlSzZ2dCoadKBu5rYuEiepUdIWoDQpESmrAggPWRWQ6bYHKLYoYRfpHgzStfZAdgpAYRWgiIrEZVxWoKAUSVi1cJTxKckRKlriVJXH1wzxKpkxKlKijvv1jl/L5uLe/bndnb+79Agje7DMzz1fE6XPPPfPMTGQmkqSV75KiC5AkDYaBLkklYaBLUkkY6JJUEga6JJXEmqI63rRpU27btq2o7iVpRTp8+PDJzJxs1VZYoG/bto3Z2dmiupekFSkinluqzSkXSSoJA12SSsJAl6SSMNAlqSQMdEkqCQNdkkrCQJekkui4Dj0i9gI3Aicy88Nt9vsp4GHglzLza4MrUSq/mZkZarXaku31eh2ASqXSsn1qaopdu3YNpTatHN3cWHQ3cAdwz1I7RMQE8FvAg4MpSyqfmZkZHnjggZZtb731Fu+8886Sx15oe/XVV1u2HzlyZMlzA+zYscPAXwU6Trlk5kNA6++iH/gc8HXgxCCKkiT1Lrp5Y1FEbAPubzXlEhGbgT8Efg64q7lfyymXiNgJ7ATYunXrTz733JJ3sEqrilMu6lZEHM7Maqu2QTzL5U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iSVBIGuiSVhIEuSSXx/wGw+qPJ+BEV0AAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# degree 4\n",
    "i = 2\n",
    "data_name = [\"Loss\", \"Error\", \"Norm_Err\"]\n",
    "for data in data_name:\n",
    "    tmp = np.zeros((total_trial, len(methods)))\n",
    "    for j in range(len(methods)):\n",
    "        tmp[:, j] = globals()[data+\"_\"+methods[j]].T[i]\n",
    "    np.savetxt(os.path.join('Rebuttal1_Degree', f\"{data}_degree_{degree_set[i]}\"), tmp)\n",
    "    sns.boxplot(data = tmp, showfliers = False)\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "id": "96195440",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD5CAYAAAAp8/5SAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAYk0lEQVR4nO3df4xV533n8feHwcSA7SUN+MfOZQIbaCxrFbfWXdxdR6m9WVs4iYqj/hGSbqLmh1ikUDf7Q7ve3aqrbSJtLHVXDRINHRHSVlsHpUmoUJYaR91a3lXW9Qw2iQ22ww2xwzFgBmzswYyNh/nuH/eMczvcmfvcO/fXHD4vCc095zzPPd9BzIczz3nueRQRmJlZcS3qdQFmZtZZDnozs4Jz0JuZFZyD3sys4Bz0ZmYF56A3Myu4xSmNJG0EvgYMALsi4quztPsnwOPAJyLiO830rbVy5cpYs2ZN0jdgZmZw8ODBMxGxqt6xhkEvaQDYAdwNZMCIpH0RcaROuweBA832nWnNmjWMjo42Ks3MzHKSXpztWMrQzQagEhHHIuIisAfYVKfd7wDfBU630NfMzDokJegHgeM121m+7x2SB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AH8Bv5ePge4J9L+p+9LakqIk7kX08De6kOW/ZSBmQ1v4V9h2rw94N7gScj4uVeFwL8C+BnETEWEW8D3wP+WadOVtSg96LkCfIbn98Ano2I/9HregAkrZK0In+9lOoPxHO9rCki/mNElCJiDdV/S/87Ijp29ZVK0vL8Jjr58Mg9QE9ndUXEKeC4pPfnuz4M9Ozm/gyfpA+GbXI/B35N0rL85/DDVO+RdUTDxcEXon5clFzSt4A7gZWSMuC/RMQ3elkT1SvVTwNP52PiAP8pIvb3riRuAv4snx2xCPh2RPTNdMY+cwOwt5oTLAYeioiHe1sSAL8D/EV+kXUM+GyP60HSMqqz8P5Vr2sBiIi/k/Qd4ElgEniKDn5CtpDTK83M7BeKOnRjZmY5B72ZWcE56M3MCs5Bb2ZWcA56M7OCc9CbmRWcg97MrOAc9GZmBff/AYGr6wlCOR53AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAATwklEQVR4nO3db4xc11nH8e8TO2mcP5WTZmOWbBeD1gQQUtOyCoVIVcAEpVA1UUVRK1FZNMi8gLoFJDAICSHxIi8QghUIyUoCRpRAmiZKVLWlkcGCSpB0nbg0wYFdSuJOu7Gd1G5t1667zsOLvdss9szO3dmZuXPs70da3bn3zp3zaHfnN2fO3DsnMhNJUnmuaLoASVJvDHBJKpQBLkmFMsAlqVAGuCQVauMwG7vpppty69atw2xSkop34MCBVzNz7MLtQw3wrVu3Mjs7O8wmJal4EfFyu+0OoUhSoQxwSSqUAS5JhTLAJalQBrgkFcoAl6RCGeCSVKihngcu6Q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XERHAtZl5KiKuBD4PfDQz/72pmpZFxG8C08CbM/M9I1DPS8B0Zo7MxSkRsRf418x8oPoK6Wsy80TDZX1XlQ9fZWlmsMam/oqIW1j63/6RzDwTEY8An87Mv+53W6X1wL87D2dmngOW5+FsVGb+C/D1putYKTMXMvPZ6vZJ4BBwS8M1ZWaeqlavrH4a70FExATw88ADTdcyqiLizcC7gAcBMvPcKIV3ZTvwP02G9wobgU0RsRG4hgFNdlNagN8CfGXFeouGQ6kEEbEVeDvwdMOlLA9VHASOAk9lZuM1AX8K/DbwesN1rJTA5yLiQDWvbNN+ADgG/FU11PRARFzbdFEX+ADwcNNFZOZXgT8GDgMLwDcy83ODaKu0AK81D6feEBHXAZ8EPpaZ32y6nsw8n5m3sTQF3+0R0eiQU0S8BziamQearKONOzLzHcC7gV+rhumatBF4B/CXmfl24DQwEp9BAVRDOu8FPjECtdzA0sjA9wPfC1wbEb80iLZKC3Dn4VyDapz5k8DHM/OxputZqXr7vR+4u9lKuAN4bzXm/PfAT0fE3zZbEmTm16rlUeBxloYPm9QCWiveMT3KUqCPincDz2bmkaYLAX4G+N/MPJaZ3wEeA35yEA2VFuDOw1lT9YHhg8ChzPyTpusBiIixiNhc3d7E0j/6i03WlJm/m5kTmbmVpf+nf8rMgfSW6oqIa6sPnqmGKX4WaPQMp8x8BfhKRNxabdoONHrywAU+yAgMn1QOA++MiGuq5+F2lj6D6rt1Tak2bKM6D2dEPAzcCdwUES3gDzLzwWar4g7gQ8CXqjFngN+rpsFryjiwtzpb4ArgkcwcidP2RswW4PGl5z4bgb/LzM82WxIAHwE+XnWevgz8csP1ABAR17B0ZtqvNl0LQGY+HRGPAs8Ci8BzDOiy+qJOI5QkvaG0IRRJUsUAl6RCGeCSVCgDXJIKZYBLUqEMcEkqlAEuSYX6P34po7m16diDAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {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4GrMrOqBYyD1LGV5u/25Zk5HxF/DtyRmTcPo7213EP/7s2rM/MUsHjz6rHKzLuB58Zdx1KZ+XRm3tf6/jjwEJ3vCzuKmjIzT7Qent36GnvvIiJqwM/TvPuWVhARrwN+CvgcQGaempQwb3kX8M1xhvkS64GpiFgPbKDNHd+qspYDvd+bVwuIiO3AjwH/MuZSFoc2HgCOAH+fmWOvCfgU8F+A02OuY6kE/i4i9kfErnEX0/JDwBzwJ63hqZsi4rxxF7XEdcAt4y4iM58E/jfwOPA08Hxm/t2w2lvLgd7zzavVFBEbgS8Cv5uZL4y7nsx8NTN/lOZ9aq+MiLEOUUXEe4Ejmbl/nHW08fbMvAK4Bvhwa1hv3NYDVwB/nJk/BrwITMrnWOcAvwD8xQTUcgHNkYPLgH8HnBcRvz6s9tZyoPd082o1tcapvwj8WWbeNu56lmq9Vf8ycPV4K+HtwC+0xqxvBd4ZEf93vCVBZj7V+vcI8Jc0hxvHrQE0lryr+gLNgJ8E1wD3ZeZ3xl0I8DPAtzJzLjNfoXnv5f8wrMbWcqB3vXm1mlofQH4OeCgz/8+46wGIiC0Rsan1/RTNX/xvjLOmzPyvmVnLzO00f5/+ITOH1pvqRUSc1/ogm9aQxs8CY59BlZnPAE9ExJtbT70LGOuEhCWuZwKGW1oeB34iIja0/j98F83PsIai602iJ9VKN68ec1lExC3ATmBzRDSAT2Tm58ZbFW8H3g882BqzBvhvmXnH+EriEuBPW7MRzgL+PDMnYprghHkD8Jetm6+vB/5fZv7teEv6ro8Cf9bqUD0K3DDmeoiIDTRnvv32uGsByMx/iYgvAPcBC8D9DHEbgDU7bVGS9P3W8pCLJGkJA12SCmGgS1IhDHRJKoSBLkmFMNAlqRAGuiQV4v8DYEK6blWTk8kAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# degree 6\n",
    "i = 3\n",
    "data_name = [\"Loss\", \"Error\", \"Norm_Err\"]\n",
    "for data in data_name:\n",
    "    tmp = np.zeros((total_trial, len(methods)))\n",
    "    for j in range(len(methods)):\n",
    "        tmp[:, j] = globals()[data+\"_\"+methods[j]].T[i]\n",
    "    np.savetxt(os.path.join('Rebuttal1_Degree', f\"{data}_degree_{degree_set[i]}\"), tmp)\n",
    "    sns.boxplot(data = tmp, showfliers = False)\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 192,
   "id": "e33533ee",
   "metadata": {},
   "outputs": [],
   "source": [
    "focus = \"degree\"\n",
    "globals()[focus + \"_set\"] = [1, 2, 4, 6]\n",
    "total_trial = 10\n",
    "methods = ['RF', 'OLS', 'Ridge', 'PolyRidge', 'RbfRidge', 'SPO+', 'ML', 'PolyKer', 'ExpRbf']\n",
    "for i in range(len(methods)):\n",
    "    globals()[f\"Loss_{methods[i]}\"] = np.zeros((total_trial, len(globals()[focus + \"_set\"])))\n",
    "    globals()[f\"Error_{methods[i]}\"] = np.zeros((total_trial, len(globals()[focus + \"_set\"])))\n",
    "    globals()[f\"Norm_Err_{methods[i]}\"] = np.zeros((total_trial, len(globals()[focus + \"_set\"])))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 268,
   "id": "31e452e6",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "*********************************************************\n",
      "Trial 1\n",
      "Time cost 3.262002468109131\n",
      "Method Random Forest\n",
      "Training samples 200\n",
      "Time Cost 0.18399786949157715\n",
      "Loss 16.835114626149917 Error 0.5498610126491643 Normalized Error 0.2975494518340569\n",
      "Method Ordinary Least Squares\n",
      "Training samples 200\n",
      "Time Cost 0.9802353382110596\n",
      "Loss 45.63586263392026 Error 2.319414484427286 Normalized Error 0.5668512175294591\n",
      "Method Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 0.959789514541626\n",
      "Loss 45.63586263392026 Error 2.318745215245238 Normalized Error 0.5668454959105639\n",
      "Method PolyKer Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 3.367999315261841\n",
      "Loss 120.60853196658705 Error 1.250573265424006 Normalized Error 0.5355829237301649\n",
      "Method RbfKer Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 3.2589972019195557\n",
      "Loss 3.697722587267247 Error 0.5240939875421 Normalized Error 0.17849804658829943\n",
      "Method SPO+\n",
      "Training samples 200\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAD4CAYAAADFAawfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAdMUlEQVR4nO3deXhV1d328e8iAyGEeQxDCGGGhDFM4iwqAgKKPK11rop2sq0oRQZBQR+ctepTROvUWluZEQQRUcE6gkImAoEAYQgQpowkJOes94/EV7TYhJCTvc859+e6vITkJLnZJPf1Y++99jLWWkRExL3qOB1ARET+OxW1iIjLqahFRFxORS0i4nIqahERlwv1xSdt3ry5jY2N9cWnFhEJSJs2bTpirW1xpvf5pKhjY2PZuHGjLz61iEhAMsbs+an36dSHiIjLqahFRFxORS0i4nIqahERl1NRi4i4nIpaRMTlVNQiIi6nohYRqQFf7TrGvE92+uRz+2TBi4hIsMgvLuWx1en8/YssYppGcvPQDkSG12y1qqhFRKppbdohpi9N4XB+Mbef35FJV3St8ZIGFbWIyFnLyS9h1ruprEzKpnvrBsy7aQB92zf22ddTUYuIVJG1lkXf7Gf2ijROnvJw3xVdmXhhJ8JDfXu5T0UtIlIFe48VMXVJMhsyjjAwtgn/e21vOreMqpWvraIWEfkvPF7La//exVNrthNSxzB7XDw3DIqhTh1TaxlU1CIiP2Frdh5TFiWxZV8uw3u0ZPa4eKIb1av1HCpqEZEfKS718MK6Hcz7ZCeN6oXx/PX9GN07GmNqb4o+nYpaROQ0X+06xpTFSWTmFDK+fzumj+pBk/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c1zRVFz2ga61tpTwHcb6AYla222tfabil/nU/6D2NbZVM4xxrQDRgGvOJ3FacaYhsCFwF8BrLWnrLUnHA3lvFCgnjEmFIgkAHegcktRn2kD3aAtptMZY2KBfsCXDkdx0rPAZMDrcA43iANygNcqTgW9Yoyp73Qop1hr9wNPAllANpBrrV3jbKqa55airtIGusHGGBMFLAL+YK3NczqPE4wxo4HD1tpNTmdxiVCgP/AXa20/oBAI2ms6xpgmlP/ruyPQBqhvjLnR2VQ1zy1FrQ10f8QYE0Z5Sb9lrV3sdB4HDQPGGGN2U35K7FJjzN+djeSofcA+a+13/8JaSHlxB6vhwC5rbY61thRYDJzncKYa55ai1ga6pzHGGMrPQW611j7tdB4nWWsfsNa2s9bGUv59sc5aG3ATU1VZaw8Ce40x3SredBmQ5mAkp2UBQ4wxkRU/N5cRgBdXq7Rnoq9pA93/MAy4CUg2xmyueNvUir0rRX4HvFUx1GQCtzmcxzHW2i+NMQuBbyi/W+pbAnA5uZaQi4i4nFtOfYiIyE9QUYuIuJyKWkTE5VTUIiIup6IWEXE5FbWIiMupqEVEXO7/AXnrfx8Q+5ibAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Time Cost 37.27885127067566\n",
      "Loss 8.746918057086548 Error 0.9991094001488184 Normalized Error 1.1731563825275904\n",
      "Method SVM Margin Learning\n",
      "Training samples 200\n",
      "Time Cost 0.8100004196166992\n",
      "Loss 3.3246485536781627 Error 0.9997914958849103 Normalized Error 1.1542142150899835\n",
      "Method Poly-Kernelized SVM Margin Learning\n",
      "Training samples 200\n",
      "Time Cost 12.111994743347168\n",
      "Loss 3.6196348687509117 Error 0.9995325881620699 Normalized Error 1.1886868397890984\n",
      "Method Rbf Kernelized SVM Margin Learning\n",
      "Training samples 200\n",
      "Time Cost 11.521740674972534\n",
      "Loss 2.8449442778289833 Error 0.9998542331029703 Normalized Error 1.1705333354231513\n",
      "*********************************************************\n",
      "Trial 2\n",
      "Time cost 3.291002035140991\n",
      "Method Random Forest\n",
      "Training samples 200\n",
      "Time Cost 0.18200206756591797\n",
      "Loss 39.003490638163726 Error 0.43765295052764797 Normalized Error 0.29067624355815247\n",
      "Method Ordinary Least Squares\n",
      "Training samples 200\n",
      "Time Cost 0.9450039863586426\n",
      "Loss 34.0650831587445 Error 2.270409905931584 Normalized Error 0.5230437383714854\n",
      "Method Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 0.9524457454681396\n",
      "Loss 34.0650831587445 Error 2.269839918063676 Normalized Error 0.5230580421634442\n",
      "Method PolyKer Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 3.8340003490448\n",
      "Loss 102.82896849762925 Error 1.372102358721529 Normalized Error 0.5398291997204685\n",
      "Method RbfKer Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 3.2300045490264893\n",
      "Loss 14.863478282611707 Error 0.5049173776361489 Normalized Error 0.17899029954992343\n",
      "Method SPO+\n",
      "Training samples 200\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAD4CAYAAADFAawfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAc/UlEQVR4nO3deXRU9f3/8ecnISEbJEBA1hD2EBJQCCDgz5UqCKKC9rhbWsXuta2sivu+tKV1pW61Wv0JYRNQqYLiUhFQmaxACFsgEAJk3zOf7x9giwomyEzuLK/HOZ5DkmHyOvfMvPxw5973x1hrERER3xXidAAREfl+KmoRER+nohYR8XEqahERH6eiFhHxca288aTx8fE2MTHRG08tIhKQNm7cWGyt7Xi8n3mlqBMTE9mwYYM3nlpEJCAZY3ae6Gc69SEi4uNU1CIiPk5FLSLi41TUIiI+T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KUZ8KY8wGa22a0zl8gY7FN+l4fJOOx/8E+rHQqQ8RER+nohYR8XG+WNTznQ7gQ3QsvknH45t0PP4noI+Fz52jFhGRb/LFFbWIiBxDRS0i4uN8pqiNMeOMMZuNMXnGmFlO53GSMaaHMWaNMSbHGJNljPmd05mcZowJNcZ8aYxZ7nQWpxlj4owxC40xuUdfI6OczuQkY8zvj75PMo0xrxtjIpzO5Gk+UdTHbKA7HkgGrjbGJDubylENwB+ttQOBM4FfBfnxAPgdkON0CB8xD3jHWpsEDCGIj4sxphvwWyDNWpvCkVHMVzmbyvN8oqg5ZgNda20d8PUGukHJWltorf3i6J/LOfJG7OZsKucYY7oDE4Dnnc7iNGNMW+Bs4AUAa22dtbbE0VDOawVEGmNaAVEE4A5UvlLUx9tAN2iL6VjGmETgDGCdw1Gc9BdgBuB2OIcv6A0cAF46eiroeWNMtNOhnGKt3QM8DuwCCoFSa+0qZ1N5nq8UdbM20A02xpgYIB241Vpb5nQeJxhjJgJF1tqNTmfxEa2AocAz1tozgEogaD/TMca048i/vnsBXYFoY8x1zqbyPF8pam2g+y3GmDCOlPRr1tpFTudx0BhgkjFmB0dOiZ1vjHnV2UiOKgAKrLVf/wtrIUeKO1iNBbZbaw9Ya+uBRcBohzN5nK8UtTbQPYYxxnDkHGSOtfZPTudxkrV2trW2u7U2kSOvi9XW2oBbMTWXtXYfsNsYM+Doty4Ash2M5LRdwJnGmKij75sLCMAPV5u1Z6K3aQPd7xgDXA9kGGO+Ovq9OUf3rhT5DfDa0UVNPjDV4TyOsdauM8YsBL7gyNVSXxKAt5PrFnIRER/nK6c+RETkBFTUIiI+TkUtIuLjVNQiIj5ORS0i4uNU1CIiPk5FLSLi4/4PJTw+C2XqoIMAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Time Cost 37.62052035331726\n",
      "Loss 21.57432637421245 Error 0.9990169154690514 Normalized Error 1.1880578134417197\n",
      "Method SVM Margin Learning\n",
      "Training samples 200\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "Time Cost 0.7979981899261475\n",
      "Loss 14.019264960767785 Error 0.9997130764175379 Normalized Error 1.1437073931552477\n",
      "Method Poly-Kernelized SVM Margin Learning\n",
      "Training samples 200\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "Time Cost 11.490755558013916\n",
      "Loss 7.6564051745661414 Error 0.9989626010961691 Normalized Error 1.1769348654239284\n",
      "Method Rbf Kernelized SVM Margin Learning\n",
      "Training samples 200\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "Time Cost 10.83365249633789\n",
      "Loss 7.7953895828363855 Error 0.9998156026549465 Normalized Error 1.1678190387374652\n",
      "*********************************************************\n",
      "Trial 3\n",
      "Time cost 3.2669992446899414\n",
      "Method Random Forest\n",
      "Training samples 200\n",
      "Time Cost 0.18200445175170898\n",
      "Loss 17.106911740628195 Error 0.4089696902915817 Normalized Error 0.2788931299471609\n",
      "Method Ordinary Least Squares\n",
      "Training samples 200\n",
      "Time Cost 0.9337835311889648\n",
      "Loss 23.253899135914317 Error 2.107057005342204 Normalized Error 0.5436148424035051\n",
      "Method Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 0.9575040340423584\n",
      "Loss 23.253899135914317 Error 2.1064720019412224 Normalized Error 0.5436086753824068\n",
      "Method PolyKer Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 3.7916975021362305\n",
      "Loss 96.23564467582494 Error 1.3802218009207612 Normalized Error 0.47641924425324006\n",
      "Method RbfKer Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 3.263996124267578\n",
      "Loss 4.01931873563255 Error 0.50339552507261 Normalized Error 0.160752617189478\n",
      "Method SPO+\n",
      "Training samples 200\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAD4CAYAAADFAawfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAct0lEQVR4nO3deXiU1cH+8e/JAiGQsO8QEnZCwhpAcCm4FkUFRd9WbdXaovXXt7a2gCBCFamK1be2Lm+pa1trXyUEERSxIoobCApJSAgEAgQICSEQkpB9zu+PpC1aKBOYyfPMzP25Li+TzDBz+zBze/LMec4x1lpERMS9wpwOICIi/5mKWkTE5VTUIiIup6IWEXE5FbWIiMtF+ONBO3XqZOPj4/3x0CIiQWnz5s3F1trOp7rNL0UdHx/Ppk2b/PHQIiJByRiz93S36dSHiIjLqahFRFxORS0i4nIqahERl1NRi4i4nIpaRMTlVNQiIi6nohYR8YGNeSX874e7/PLYfrngRUQkVJRW1vLoO9t5beM+4jpE8/3xfYhu4dtqVVGLiJwFay2rMw+xYMU2isur+dGFCfz8soE+L2lQUYuINNmh0ioeeDOT97IKGdojlhduHUNyr7Z+ez4VtYiIlzwey6sb9vLY6hzqPB7mTB7MHRckEBHu34/7VNQiIl7YUVjGfanpfLnvGBf078SvpyUT1zG6WZ5bRS0i8h9U19XzzNpcnvtwF21aRvDEDcO5blRPjDHNlkFFLSJyGhvzSrhvWTq7D1cwdUQPHpiSSMc2LZs9h4paROQbTp5y16t9K175wVi+NfCUa/o3CxW1iEij5pxy1xRePbsxZg9QBtQDddbaFH+GEhFpbs095a4pmvK/iUnW2mK/JRERcYBTU+6aQqc+RCRk7SgsY86yDDbvPdrsU+6awtuitsAaY4wF/mCtXeLHTCIifuWGKXdN4W1Rn2+tPWiM6QK8Z4zZbq396OQ7GGNmADMA4uLifBxTRMQ33DLlrim8Kmpr7cHGfxcZY9KAscBH37jPEmAJQEpKivVxThGRc+K2KXdNccai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z1p72FpbCywDJjicyefcUtTaQPckxhhDwznIbGvtk07ncZK1do61tpe1Np6G18Vaa23QjZi8Za09BOQbYwY1/ugSIMvBSE7bB5xnjIlufN9cQhB+uOrVnon+pg10/835wPeADGPMlsafzW3cu1Lkv4FXGwc1u4HbHc7jGGvtBmPMUuBLGmZLfUUQXk6uS8hFRFzOLac+RETkNFTUIiIup6IWEXE5FbWIiMupqEVEXE5FLSLicipqERGX+/8Is4FNTPPAPwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Time Cost 37.68632698059082\n",
      "Loss 10.711858272223713 Error 0.9991408514282607 Normalized Error 1.1711953028864768\n",
      "Method SVM Margin Learning\n",
      "Training samples 200\n",
      "Time Cost 0.8210020065307617\n",
      "Loss 7.501698695183982 Error 0.9997408551626715 Normalized Error 1.1381649763368782\n",
      "Method Poly-Kernelized SVM Margin Learning\n",
      "Training samples 200\n",
      "Time Cost 12.306004762649536\n",
      "Loss 6.467453538427338 Error 0.9993018093940634 Normalized Error 1.1720667756628302\n",
      "Method Rbf Kernelized SVM Margin Learning\n",
      "Training samples 200\n",
      "Time Cost 11.610000133514404\n",
      "Loss 3.183093738465175 Error 0.9998163380927564 Normalized Error 1.1498342703674425\n",
      "*********************************************************\n",
      "Trial 4\n",
      "Time cost 3.2700023651123047\n",
      "Method Random Forest\n",
      "Training samples 200\n",
      "Time Cost 0.1880016326904297\n",
      "Loss 19.360041728688127 Error 0.4576931000432059 Normalized Error 0.29762301732382335\n",
      "Method Ordinary Least Squares\n",
      "Training samples 200\n",
      "Time Cost 0.9846014976501465\n",
      "Loss 47.31319863393863 Error 2.5158186878229483 Normalized Error 0.5478598177899413\n",
      "Method Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 0.920912504196167\n",
      "Loss 47.31319863393863 Error 2.514980103366653 Normalized Error 0.5478363190096067\n",
      "Method PolyKer Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 3.3470003604888916\n",
      "Loss 75.46329608488323 Error 1.6397399537151365 Normalized Error 0.43839968034375476\n",
      "Method RbfKer Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 3.2350034713745117\n",
      "Loss 5.196264655658279 Error 0.5371872441593858 Normalized Error 0.17133206384176602\n",
      "Method SPO+\n",
      "Training samples 200\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAD4CAYAAADFAawfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAcoklEQVR4nO3deXRU9d3H8fePhCQkBGIIO4Qk7EsIaGTVKuKCCipIq7ZYK7XYPvbRPloREEQUFHGp2lYtLq1W2qpssogFLVS0FAWFJCQEwhogJBDIQhayzO/5g9iCokkwk3tn5vM6x2OWYeZzLsnnfLlz7+9nrLWIiIh7NXE6gIiIfDsVtYiIy6moRURcTkUtIuJyKmoREZcL9saTxsTE2Li4OG88tYiIX9q8efNRa23rs33PK0UdFxfHpk2bvPHUIiJ+yRiz75u+p1MfIiIup6IWEXE5FbWIiMupqEVEXE5FLSLicipqERGXU1GLiLicilpEpAF8uucYf/jnLq88t1dueBERCRQFpRXMXbWdv32WTWx0OLcO7UJ4SMNWq4paROQcWGtZtvUQj65I53hpJXd+L4F7Lu/e4CUNKmoRkXrbl1/C9KVprN95lKTOUbwxMZE+HVp47fVU1CIidVRZ7eHl9bt57oOdNA1qwqzr+jJhSBeCmhivvm6ditoYsxcoBqqBKmttsjdDiYi4zeZ9x5m2OJXM3GJG9W3Hw9f1pV3LsEZ57fpM1COstUe9lkRExIUKyyp58u/bWbBxP+1ahPHyj5O5ok/bRs2gUx8iImdhrWVlag6zlqeTf+Iktw+L594re9A8tPFr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VlgMuBxOIcbJABHgD/WnAp6xRgT4XQop1hrDwJPAfuBHKDQWrva2VQNzy1FXacNdAONMaY5sAj4lbW2yOk8TjDGjAbyrLWbnc7iEsHA+cCL1tqBQAkQsO/pGGPO49S/vuOBDkCEMWaCs6kanluKWhvofoUxpimnSnqBtXax03kcNBy4zhizl1OnxC4zxrzpbCRHHQAOWGu//BfWQk4Vd6C6HNhjrT1ira0EFgPDHM7U4NxS1NpA9zTGGMOpc5AZ1tpnnM7jJGvtVGttJ2ttHKd+Lv5hrfW7iamurLWHgWxjTM+aL40E0h2M5LT9wBBjTHjN781I/PDN1Trtmeht2kD3a4YDtwKpxpgtNV+bVrN3pcj/AgtqhprdwO0O53GMtXajMWYh8Dmnrpb6Aj+8nVy3kIuIuJxbTn2IiMg3UFGLiLicilpExOVU1CIiLqeiFhFxORW1iIjLqahFRFzu/wGcBZcXMousvAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Time Cost 37.21158576011658\n",
      "Loss 11.936413915854521 Error 0.9990897349183272 Normalized Error 1.1790361715325288\n",
      "Method SVM Margin Learning\n",
      "Training samples 200\n",
      "Time Cost 0.8049981594085693\n",
      "Loss 9.73607130482887 Error 0.9998114526754098 Normalized Error 1.1714503050988705\n",
      "Method Poly-Kernelized SVM Margin Learning\n",
      "Training samples 200\n",
      "Time Cost 12.034725666046143\n",
      "Loss 11.452592229768085 Error 0.9994863481568277 Normalized Error 1.2124345415828275\n",
      "Method Rbf Kernelized SVM Margin Learning\n",
      "Training samples 200\n",
      "Time Cost 11.704768180847168\n",
      "Loss 4.595977667427645 Error 0.9998445456896711 Normalized Error 1.1842811852266195\n",
      "*********************************************************\n",
      "Trial 5\n",
      "Time cost 3.2705512046813965\n",
      "Method Random Forest\n",
      "Training samples 200\n",
      "Time Cost 0.18799924850463867\n",
      "Loss 19.370456035804494 Error 0.4614097480311318 Normalized Error 0.29292659060759685\n",
      "Method Ordinary Least Squares\n",
      "Training samples 200\n",
      "Time Cost 0.9816138744354248\n",
      "Loss 27.077223486626956 Error 2.535523145435549 Normalized Error 0.5448184973172765\n",
      "Method Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 0.9188706874847412\n",
      "Loss 27.077223486626956 Error 2.534746398882086 Normalized Error 0.544808894253337\n",
      "Method PolyKer Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 3.84903883934021\n",
      "Loss 84.83333623629719 Error 1.5587594414495711 Normalized Error 0.5280648627154328\n",
      "Method RbfKer Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 3.2450039386749268\n",
      "Loss 7.861826676310968 Error 0.5111209464034426 Normalized Error 0.17110340909473354\n",
      "Method SPO+\n",
      "Training samples 200\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAD4CAYAAADFAawfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAdSUlEQVR4nO3dd3yV5cH/8c9FyIYAIWwIYUOAsIII1KJSLQqiYIfWotKB9mmfto/KFBQH7vqIv6I1rVqt1KcaArJUFBlOVBQyCRDCCAQSRiaZJ9fvD2KLChI0J/d9zvm+Xy9eZhxOvt7kfF9X7lzDWGsRERH3auZ0ABER+WYqahERl1NRi4i4nIpaRMTlVNQiIi7X3BtPGhMTY+Pi4rzx1CIifmnr1q1HrbXtzvQ5rxR1XFwcn376qTeeWkTELxlj9p3tc7r1ISLicipqERGXU1GLiLicilpExOVU1CIiLqeiFhFxORW1iIjLqahFRBrBx7nHeWZTjlee2ysLXkREAkVJZQ0Pvb6Df27ZT2x0BNNGdycipHGrtUHPZozZC5QCHqDWWpvYqClERHzQmxmHueu1dApLq/jl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URczo1FneR0ABfRtfgyXY8v0/X4D7++Fq67Ry0iIl/mxhG1iIicRkUtIuJyrilqY8wEY0y2MWa3MWaO03mcZIzpZozZYIzJMsZkGGP+4HQmpxljgowxnxtjVjudxWnGmNbGmGRjzI7675HRTmdykjHmf+pfJ+nGmJeNMWFOZ2psrijq0w7QvQKIB643xsQ7m8pRtcDt1toBwIXAbwP8egD8AchyOoRLLAbesNb2B4YQwNfFGNMF+D2QaK0dxKmtmK9zNlXjc0VRc9oButbaauCLA3QDkrU231r7Wf3bpZx6IXZxNpVzjDFdgYnA35zO4jRjTBTwfeBZAGtttbW2yNFQzmsOhBtjmgMR+OEJVG4p6jMdoBuwxXQ6Y0wcMAzY4nAUJz0BzALqHM7hBj2BQuD5+ltBfzPGRDodyinW2oPAY8B+IB8ottauczZV43NLUTfoAN1AY4xpASwD/mitLXE6jxOMMZOAAmvtVqezuERzYDjwtLV2GFAOBOzvdIwxbTj103cPoDMQaYz5ubOpGp9biloH6H6FMSaYUyW91Fqb4nQeB40FJhtj9nLqltilxpiXnI3kqDwgz1r7xU9YyZwq7kD1AyDXWltora0BUoAxDmdqdG4pah2gexpjjOHUPcgsa+3jTudxkrV2rrW2q7U2jlPfF+9Ya/1uxNRQ1trDwAFjTL/6D40HMh2M5LT9wIXGmIj61814/PCXqw06M9HbdIDu14wFpgFpxpht9R+bV392pch/A0vrBzV7gOkO53GMtXaLMSYZ+IxTs6U+xw+Xk2sJuYiIy7nl1oeIiJyFilpExOVU1CIiLqeiFhFxORW1iIjLqahFRFxORS0i4nL/H3Ygem/iVwZDAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Time Cost 37.29031491279602\n",
      "Loss 13.851736765070516 Error 0.9990292293731113 Normalized Error 1.1590678560322303\n",
      "Method SVM Margin Learning\n",
      "Training samples 200\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "Time Cost 0.8250002861022949\n",
      "Loss 6.73531204395589 Error 0.9997270458300231 Normalized Error 1.1087440604776793\n",
      "Method Poly-Kernelized SVM Margin Learning\n",
      "Training samples 200\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "Time Cost 12.323009967803955\n",
      "Loss 8.86736185642247 Error 0.9990661725845678 Normalized Error 1.1229436665905788\n",
      "Method Rbf Kernelized SVM Margin Learning\n",
      "Training samples 200\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "A_B is singular.\n",
      "Time Cost 11.87141728401184\n",
      "Loss 5.326305084433144 Error 0.9998027832279037 Normalized Error 1.1166515670640624\n",
      "*********************************************************\n",
      "Trial 6\n",
      "Time cost 3.3510005474090576\n",
      "Method Random Forest\n",
      "Training samples 200\n",
      "Time Cost 0.18699932098388672\n",
      "Loss 29.588589330426725 Error 0.4127571699442077 Normalized Error 0.2896840194970347\n",
      "Method Ordinary Least Squares\n",
      "Training samples 200\n",
      "Time Cost 0.9330041408538818\n",
      "Loss 32.294916940591 Error 2.073056948697112 Normalized Error 0.5190578878673532\n",
      "Method Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 0.9592247009277344\n",
      "Loss 32.294916940591 Error 2.0723740238577317 Normalized Error 0.5190414470140715\n",
      "Method PolyKer Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 3.2949962615966797\n",
      "Loss 70.39835409165629 Error 1.0345957997196078 Normalized Error 0.4055202653377524\n",
      "Method RbfKer Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 3.274724245071411\n",
      "Loss 10.024515905419689 Error 0.5445194151298087 Normalized Error 0.1726928961163172\n",
      "Method SPO+\n",
      "Training samples 200\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAD4CAYAAADFAawfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcn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itqnAbrhxhjTFEgDfm2tLXU6jxOMMROAYmvteqezuEQkMAR4wlo7GCgHwvZ3OsaYlhz76bs70AloYoz5ibOp/M8tRa0But9gjIniWEm/bK1NdzqPg0YDlxljdnDsktj5xpiXnI3kqN3Abmvtv3/CWsyx4g5XY4Ht1tr91tpaIB042+FMfueWotYA3eMYYwzHrkFustY+7HQeJ1lrZ1pru1hrEzn2unjPWhtyZ0y+stbuBQqMMX3rP3UBkONgJKftAkYaY+Lq3zcXEIK/XPVpZmKgaYDut4wGrgMyjTEb6j83q352pcj/AS/Xn9TkAzc6nMcx1tpPjTGLgS85drfUV4TgcnItIRcRcTm3XPoQEZHvoKIWEXE5FbWIiMupqEVEXE5FLSLicipqERGXU1GLiLjc/wMUFIBg25Ul9QAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Time Cost 37.33538556098938\n",
      "Loss 17.984456188156596 Error 0.9986810521164359 Normalized Error 1.1523890322215598\n",
      "Method SVM Margin Learning\n",
      "Training samples 200\n",
      "A_B is singular.\n",
      "Time Cost 0.834003210067749\n",
      "Loss 12.2233804904459 Error 0.9996843444491176 Normalized Error 1.1115019964132\n",
      "Method Poly-Kernelized SVM Margin Learning\n",
      "Training samples 200\n",
      "A_B is singular.\n",
      "Time Cost 12.654709577560425\n",
      "Loss 10.552147759666607 Error 0.9990109697245257 Normalized Error 1.137260818574995\n",
      "Method Rbf Kernelized SVM Margin Learning\n",
      "Training samples 200\n",
      "A_B is singular.\n",
      "Time Cost 12.271223068237305\n",
      "Loss 5.937269218045406 Error 0.9997919966362693 Normalized Error 1.1272782104998018\n",
      "*********************************************************\n",
      "Trial 7\n",
      "Time cost 3.2739999294281006\n",
      "Method Random Forest\n",
      "Training samples 200\n",
      "Time Cost 0.17900443077087402\n",
      "Loss 23.31741501338785 Error 0.4300911855551907 Normalized Error 0.29053903169816975\n",
      "Method Ordinary Least Squares\n",
      "Training samples 200\n",
      "Time Cost 0.978705644607544\n",
      "Loss 33.08274133323348 Error 3.1360810572804882 Normalized Error 0.6238387644855234\n",
      "Method Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 0.9196999073028564\n",
      "Loss 33.08274133323348 Error 3.135305773249444 Normalized Error 0.6238441846241449\n",
      "Method PolyKer Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 3.837996244430542\n",
      "Loss 82.87306685919118 Error 1.523348101512616 Normalized Error 0.6363106054733852\n",
      "Method RbfKer Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 3.2286763191223145\n",
      "Loss 5.594857058372664 Error 0.5525490159622257 Normalized Error 0.1873265021908581\n",
      "Method SPO+\n",
      "Training samples 200\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAD4CAYAAADFAawfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAddklEQVR4nO3dd3zV1cHH8c8hjBAgjLADSdgzYQVkVKu4sFgExGrrqNKnWDsdlKWiuEAftPK0VqVaxUq1QkBAQcXieFwoQ5KQAWGFsBJGBiQh457nj8SnAdFc4N78fvfe7/v18mXG5eb7+iX55uTk/M4x1lpERMS96jkdQEREvp+KWkTE5VTUIiIup6IWEXE5FbWIiMvV98eTtm7d2sbFxfnjqUVEgtLGjRsPW2vbnOl9finquLg4NmzY4I+nFhEJSsaYPd/1Pk19iIi4nIpaRMTlVNQiIi7nVVEbY1oYY5YaYzKMMenGmBH+DiYiIlW8/WPiAuAda+0kY0xDIMKPmUREpIZai9oYEwlcBNwKYK0tA8r8G0tERL7hzdRHVyAPeMkYs9kY84IxpsnpDzLGTDHGbDDGbMjLy/N5UBGRUOVNUdcHBgPPWmsHAS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dr8U9fkwxmyw1iY6ncMNdC1OpetxKl2P/wj2a6GpDxERl1NRi4i4nBuLeqHTAVxE1+JUuh6n0vX4j6C+Fq6boxYRkVO5cUQtIiI1qKhFRFzONUVtjBljjMk0xmQZY2Y4ncdJxpjOxpgPjDHpxpitxpg/OJ3JacaYMGPMZmPMW05ncZoxpoUxZqkxJqP6a2SE05mcZIy5q/r7JNUY85oxJtzpTL7miqKucYDuVUBf4KfGmL7OpnJUBXCPtbYPMBz4TYhfD4A/AOlOh3CJBcA71trewABC+LoYY6KB3wOJ1tr+VG3FfIOzqXzPFUVNjQN0rbVlwDcH6IYka+0Ba+2m6peLqPpGjHY2lXOMMZ2AscALTmdxmjEmErgIeBHAWltmrc13NJTz6gONjTH1gQiC8AQqtxT1mQ7QDdliqskYEwcMAtY7HMVJTwPTAI/DOdygK5AHvFQ9FfSCMaaJ06GcYq3dB8wHsoEDQIG19j1nU/meW4raqwN0Q40xpimQBNxprS10Oo8TjDFXA7nW2o1OZ3GJ+sBg4Flr7SDgBBCyf9MxxrSk6rfvLkBHoIkx5iZnU/meW4paB+iexhjTgKqSXmytXeZ0HgeNAsYZY3ZTNSU22hjzqrORHJUD5Fhrv/kNaylVxR2qLgN2WWvzrLXlwDJgpMOZfM4tRa0DdGswxhiq5iDTrbVPOZ3HSdbamdbaTtbaOKq+LtZZa4NuxOQta+1BYK8xplf1my4F0hyM5LRsYLgxJqL6++ZSgvCPq16dmehvOkD3W0YBNwMpxpivq982q/rsSpHfAYurBzU7gdsczuMYa+16Y8xSYBNVq6U2E4S3k+sWchERl3PL1IeIiHwHFbWIiMupqEVEXE5FLSLicipqERGXU1GLiLicilpExOX+D8Q2xmCXcjI3AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Time Cost 37.407124042510986\n",
      "Loss 12.778094194825364 Error 0.9990129323574698 Normalized Error 1.172047672017644\n",
      "Method SVM Margin Learning\n",
      "Training samples 200\n",
      "Time Cost 0.8060009479522705\n",
      "Loss 5.505857040264636 Error 0.999781689870315 Normalized Error 1.1390687366059455\n",
      "Method Poly-Kernelized SVM Margin Learning\n",
      "Training samples 200\n",
      "Time Cost 11.997000217437744\n",
      "Loss 6.657072234613913 Error 0.9993620347419199 Normalized Error 1.1608962373103475\n",
      "Method Rbf Kernelized SVM Margin Learning\n",
      "Training samples 200\n",
      "Time Cost 11.815676927566528\n",
      "Loss 3.6463944954202625 Error 0.9998177703040888 Normalized Error 1.1452600348685582\n",
      "*********************************************************\n",
      "Trial 8\n",
      "Time cost 3.429002285003662\n",
      "Method Random Forest\n",
      "Training samples 200\n",
      "Time Cost 0.18700170516967773\n",
      "Loss 62.908002865106305 Error 0.5531299267966474 Normalized Error 0.30241194308501107\n",
      "Method Ordinary Least Squares\n",
      "Training samples 200\n",
      "Time Cost 0.9890017509460449\n",
      "Loss 44.95596546376335 Error 3.0819570049844764 Normalized Error 0.5765473490977849\n",
      "Method Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 0.9321212768554688\n",
      "Loss 44.95596546376335 Error 3.0811940579065586 Normalized Error 0.5765590358128604\n",
      "Method PolyKer Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 3.920997381210327\n",
      "Loss 87.95989437598931 Error 1.7253436677817444 Normalized Error 0.5647537589516651\n",
      "Method RbfKer Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 3.2690000534057617\n",
      "Loss 6.574487532516412 Error 0.5077217396123422 Normalized Error 0.18134426629001948\n",
      "Method SPO+\n",
      "Training samples 200\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAD8CAYAAABekO4JAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWX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wDuBzO4Qt6A2XAy42Pgl4wxrRyOpRTrLW7gCeAncBu4KC19j1nU3merxS1WwfoBhtjTGtgMfAHa22F03mcYIy5BCi11m5yOouPCAOGAX+x1g4FDgFB+zcdY0w7jv723QvoCrQyxlzrbCrP85WidusA3WBijGnG0ZJ+3Vqb4nQeB40BLjXG5HP0kdj5xph/OBvJUUVAkbX229+wFnG0uIPVWGCHtbbMWlsHpACjHc7kcb5S1DpA9xjGGMPRZ5DZ1tonnc7jJGvtDGttd2ttHEe/Lz6w1gbciMld1to9QKExpn/jm34BZDkYyWk7gTOMMRGNPze/IAD/uOrWmYnepgN0f2AMMBVIN8ZsbnzbzMazK0X+B3i9cVCzHbjR4TyOsdZuMMYsAr7m6GypbwjAVYpamSgi4uN85dGHiIj8CBW1iIiPU1GLiPg4FbWIiI9TUYuI+DgVtYiIj1NRi4j4OBW1iIiP+z+DpMTR0dYn6AAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Time Cost 37.60673427581787\n",
      "Loss 10.72252542250448 Error 0.998974425757093 Normalized Error 1.169660739785104\n",
      "Method SVM Margin Learning\n",
      "Training samples 200\n",
      "Time Cost 0.8210036754608154\n",
      "Loss 7.05403735226034 Error 0.9997474421106012 Normalized Error 1.1446102326389824\n",
      "Method Poly-Kernelized SVM Margin Learning\n",
      "Training samples 200\n",
      "Time Cost 12.181744813919067\n",
      "Loss 8.824321010635865 Error 0.9992737766433016 Normalized Error 1.15788727879289\n",
      "Method Rbf Kernelized SVM Margin Learning\n",
      "Training samples 200\n",
      "Time Cost 11.511003494262695\n",
      "Loss 2.830175538735656 Error 0.9998306105179099 Normalized Error 1.1460847343522986\n",
      "*********************************************************\n",
      "Trial 9\n",
      "Time cost 3.3299994468688965\n",
      "Method Random Forest\n",
      "Training samples 200\n",
      "Time Cost 0.184004545211792\n",
      "Loss 24.476644733385044 Error 0.42224393042123903 Normalized Error 0.2731680899707363\n",
      "Method Ordinary Least Squares\n",
      "Training samples 200\n",
      "Time Cost 0.9760046005249023\n",
      "Loss 26.595599074240077 Error 2.480565253729331 Normalized Error 0.5468311406786572\n",
      "Method Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 0.9280002117156982\n",
      "Loss 26.595599074240077 Error 2.4798725940220727 Normalized Error 0.5468230374588866\n",
      "Method PolyKer Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 3.859995126724243\n",
      "Loss 85.72997847692886 Error 1.3579668624998298 Normalized Error 0.5105448103628\n",
      "Method RbfKer Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 3.2820000648498535\n",
      "Loss 3.7947789608456053 Error 0.5115291507943948 Normalized Error 0.1660089518052767\n",
      "Method SPO+\n",
      "Training samples 200\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAD4CAYAAADFAawfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAd20lEQVR4nO3deXiU5d328e/FEkjCDmEnCXuAsAcioFbQKiIFFFu1uNUF7VPbPr7KalUUVMS6tXVDLWpFn5YQhCIC4oaKooCSDcIaSAIhYEgCCdlmrvePxBYVzQAzuWc5P8fhIUmGyXkMmZMf93JdxlqLiIj4r3pOBxARkZ+mohYR8XMqahERP6eiFhHxcypqERE/18AXT9qmTRsbGxvri6cWEQlKmzdvPmKtjTrV13xS1LGxsWzatMkXTy0iEpSMMft+7GseHfowxrQwxiQZY7YbY7YZY0Z4L56IiPwUTyfqp4HV1torjTFhQIQPM4mIyElqLWpjTDPgfOBGAGttBVDh21giIvItTw59dAMOA4uMMV8ZY14yxkR+/0HGmKnGmE3GmE2HDx/2elARkVDlSVE3AIYAz1lr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6eiFhHxcypqERE/9/8Bjkm0Xi9+P8EAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Time Cost 37.55709409713745\n",
      "Loss 8.695885965545468 Error 0.9989883763815224 Normalized Error 1.1820202141438259\n",
      "Method SVM Margin Learning\n",
      "Training samples 200\n",
      "Time Cost 0.8069984912872314\n",
      "Loss 5.657382619975527 Error 0.9997793975722279 Normalized Error 1.1518777755325553\n",
      "Method Poly-Kernelized SVM Margin Learning\n",
      "Training samples 200\n",
      "Time Cost 11.937146186828613\n",
      "Loss 14.022333488355388 Error 0.999375760652838 Normalized Error 1.1916067792988982\n",
      "Method Rbf Kernelized SVM Margin Learning\n",
      "Training samples 200\n",
      "Time Cost 11.244996309280396\n",
      "Loss 2.2103445880230175 Error 0.9998556405643709 Normalized Error 1.1724204774887008\n",
      "*********************************************************\n",
      "Trial 10\n",
      "Time cost 3.323000431060791\n",
      "Method Random Forest\n",
      "Training samples 200\n",
      "Time Cost 0.18700027465820312\n",
      "Loss 31.441139804784996 Error 0.48801194810310267 Normalized Error 0.30037216377162507\n",
      "Method Ordinary Least Squares\n",
      "Training samples 200\n",
      "Time Cost 0.9754021167755127\n",
      "Loss 26.94143342725248 Error 2.1560356087200345 Normalized Error 0.5220849260843042\n",
      "Method Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 0.9300997257232666\n",
      "Loss 26.94143342725248 Error 2.1554497659435294 Normalized Error 0.5220891660762704\n",
      "Method PolyKer Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 3.9059996604919434\n",
      "Loss 104.98222733773774 Error 1.1922828169374413 Normalized Error 0.44007730978348497\n",
      "Method RbfKer Ridge Regression\n",
      "Training samples 200\n",
      "Time Cost 3.2600042819976807\n",
      "Loss 9.174460773843716 Error 0.5432289556808687 Normalized Error 0.17524462121970394\n",
      "Method SPO+\n",
      "Training samples 200\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAD7CAYAAABDld6xAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAdZUlEQVR4nO3dd3jV5f3/8ecNBEKAMBI2hBBWWGGFbV04gSKifp1otRW/7bettpUlTrCKuGvViuL6iVoJoIgKOEpxlSkZJIQVSMJeIYusc+7fH0ltsGhO4Jx8zng9rstLkpwkr+tzkRdvbj6f+zbWWkRExH/VczqAiIj8NBW1iIifU1GLiPg5FbWIiJ9TUYuI+DkVtYiIn/OoqI0xLYwxScaYrcaYDGPMSF8HExGRSg08fN2zwApr7dXGmIZAhA8ziYhINaamB16MMZFAMhBnPXw6Jjo62sbGxp59OhGRELFx48Yj1trWp/uYJxN1HHAYeM0YMwDYCNxprS36sU+IjY1lw4YNZxRWRCQUGWP2/NjHPFmjbgAMBl601g4CioAZp/kmU4wxG4wxGw4fPnzGYUVE5FSeFHUukGutXVv1dhKVxX0Ka+18a22itTaxdevTTu8iInIGaixqa+0BIMcY06vqXWOAdJ+mEhGR73l618fvgIVVd3zsAm71XSQREanOo6K21m4GEn0bRURETkdPJoqI+DkVtYiIn1NRi4h4wfrdx3jpnzt98rU9/cdEERE5jaLSCuat2Mqb/9pD55YRTB7ZhYiG3q1WFbWIyBn6cvthZi5JZW/eSW4ZGcvUS3t5vaRBRS0iUmsnTpbz54/SeW9DLnGtm7DojpEkxrby2fdTUYuI1MKqLQe49/00jhaV8evzu3HnmB6Eh9X36fdUUYuIeOBoYSkPfpjOh8n7iG/XjAW3DKV/p+Z18r1V1CIiP8Fay4cp+3lw2RYKSsr548U9+d/zutGwQd3dNKeiFhH5EQfzS5i1NI3PMg4yoHMLHr86gZ5tm9V5DhW1iMgPWGt5b0MOD3+UQVm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MAhY63AUJz0DTAPcDufwB3HAYeC1qqWgV4wxTZwO5RRr7V7gCSAb2A+csNaucjaV9/lLUXt0gG6oMcY0BRYDd1lr853O4wRjzHjgkLV2o9NZ/EQDYDDworV2EFAEhOy/6RhjWlL5t++uQAegiTHmJmdTeZ+/FLVHB+iGEmNMGJUlvdBau8TpPA4aDUwwxuymcknsQmPMW85GclQukGut/fffsJKoLO5QdRGQZa09bK0tB5YAoxzO5HX+UtQ6QLcaY4yhcg0yw1r7lNN5nGStnWmt7WStjaXy98UX1tqgm5g8Za09AOQYY3pVvWsMkO5gJKdlAyOMMRFVPzdjCMJ/XPXozERf0wG6/2U0MBlINcZsrnrfPVVnV4r8DlhYNdTsAm51OI9jrLVrjTFJwCYq75b6jiB8SlFPJoqI+Dl/WfoQEZEfoaIWEfFzKmoRET+nohYR8XMqahERP6eiFhHxcypqERE/p6IWEfFz/x95Cqz8JU4kTwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Time Cost 38.309072732925415\n",
      "Loss 17.317843387112298 Error 0.9988568063978953 Normalized Error 1.1492798498051728\n",
      "Method SVM Margin Learning\n",
      "Training samples 200\n",
      "Time Cost 0.8130011558532715\n",
      "Loss 4.424560568740523 Error 0.9997134696364945 Normalized Error 1.1317913574590421\n",
      "Method Poly-Kernelized SVM Margin Learning\n",
      "Training samples 200\n",
      "Time Cost 11.946004390716553\n",
      "Loss 10.11033953807722 Error 0.9992676582247254 Normalized Error 1.1402617768814145\n",
      "Method Rbf Kernelized SVM Margin Learning\n",
      "Training samples 200\n",
      "Time Cost 11.333000183105469\n",
      "Loss 2.149967442980214 Error 0.9998073508486544 Normalized Error 1.1282039845689464\n"
     ]
    }
   ],
   "source": [
    "for trial in range(total_trial):\n",
    "    # Generate Shortest Path Samples\n",
    "    benchmark = 2\n",
    "    dim_edge_vert = 4\n",
    "    dim_edge_hori = 4\n",
    "    dim_features = 6\n",
    "    dim_cost = dim_edge_hori * (dim_edge_vert + 1) + (dim_edge_hori + 1) * dim_edge_vert\n",
    "    Coeff_Mat = np.random.binomial(n=1, p=0.5, size = (dim_cost, dim_features))\n",
    "    print(\"*********************************************************\")\n",
    "    print(\"Trial\", trial + 1)\n",
    "    \n",
    "    N_train = 200\n",
    "    # N_valid = 200\n",
    "    N_test = 1000\n",
    "    degree = 6\n",
    "    additive_noise = 0.0\n",
    "    scale_noise_uni = 0.0\n",
    "    scale_noise_div = 0.0\n",
    "    attack_threshold = 0.5\n",
    "    attack_power = 3.0\n",
    "    z_train, c_train, A_train, b_train = dg.GenerateShortestPath(N_samples = N_train, dim_features = dim_features, Coeff_Mat=Coeff_Mat,\n",
    "                                                                dim_edge_vert = dim_edge_vert, dim_edge_hori = dim_edge_hori,\n",
    "                                                                degree=degree, additive_noise=additive_noise, scale_noise_uni=scale_noise_uni, scale_noise_div=scale_noise_div, attack_threshold=attack_threshold, attack_power=attack_power)\n",
    "    # z_valid, c_valid, A_valid, b_valid = dg.GenerateShortestPath(N_samples = N_valid, dim_features = dim_features, Coeff_Mat=Coeff_Mat,\n",
    "    #                                                             dim_edge_vert = dim_edge_vert, dim_edge_hori = dim_edge_hori,\n",
    "    #                                                             degree=degree, additive_noise=additive_noise, scale_noise_uni=scale_noise_uni, scale_noise_div=scale_noise_div, attack_threshold=attack_threshold, attack_power=attack_power)\n",
    "    z_test, c_test, A_test, b_test = dg.GenerateShortestPath(N_samples = N_test, dim_features = dim_features, Coeff_Mat=Coeff_Mat,\n",
    "                                                            dim_edge_vert = dim_edge_vert, dim_edge_hori = dim_edge_hori,\n",
    "                                                            degree=degree, additive_noise=additive_noise, scale_noise_uni=scale_noise_uni, scale_noise_div=scale_noise_div, attack_threshold=attack_threshold, attack_power=attack_power)\n",
    "    # Compute Optimal Solutions\n",
    "    start = time.time()\n",
    "    basic_train, nonb_train, solution_train = lpm.ComputeBasis(c=c_train, A=A_train, b=b_train)\n",
    "    #basic_valid, nonb_valid, solution_valid = lpm.ComputeBasis(c=c_valid, A=A_valid, b=b_valid)\n",
    "    basic_test, nonb_test, solution_test = lpm.ComputeBasis(c=c_test, A=A_test, b=b_test)\n",
    "    print(\"Time cost\", time.time() - start)\n",
    "    \n",
    "    \n",
    "    # Random Forest\n",
    "    # No Theta, directly predict c\n",
    "    alg = 'RF'\n",
    "    print(\"Method Random Forest\")\n",
    "    print(\"Training samples\", N_train)\n",
    "    start = time.time()\n",
    "    regr = RandomForestRegressor(random_state=0)\n",
    "    regr.fit(z_train, c_train)\n",
    "    hat_c = regr.predict(z_test)\n",
    "    globals()[\"time_\"+alg] = time.time() - start\n",
    "    print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "    globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark, A=A_test, b=b_test, c=c_test, z=z_test,\n",
    "                                                                                             direct=True, hat_c=hat_c, solved = True, solution=solution_test)\n",
    "    print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "    mark = 0\n",
    "    for j in range(len(globals()[focus + \"_set\"])):\n",
    "        if globals()[focus] == globals()[focus + \"_set\"][j]:\n",
    "            mark = j\n",
    "    globals()[\"Loss_\" + alg][trial][mark] = np.average(globals()[\"loss_\" + alg])\n",
    "    globals()[\"Error_\" + alg][trial][mark] = np.average(globals()[\"error_\" + alg])\n",
    "    globals()[\"Norm_Err_\" + alg][trial][mark] = np.average(globals()[\"norm_err_\" + alg])\n",
    "    \n",
    "    \n",
    "    # Ordinary Least Squares\n",
    "    alg = 'OLS'\n",
    "    print(\"Method Ordinary Least Squares\")\n",
    "    print(\"Training samples\", N_train)\n",
    "    start = time.time()\n",
    "    globals()[\"Theta_\"+alg] = lm.OrdinaryLeastSquares(A = A_train, b = b_train, c = c_train, z = z_train)\n",
    "    globals()[\"time_\"+alg] = time.time() - start\n",
    "    print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "    globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = z_test, direct = False,\n",
    "                                                                                                    Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "    print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "    mark = 0\n",
    "    for j in range(len(globals()[focus + \"_set\"])):\n",
    "        if globals()[focus] == globals()[focus + \"_set\"][j]:\n",
    "            mark = j\n",
    "    globals()[\"Loss_\" + alg][trial][mark] = np.average(globals()[\"loss_\" + alg])\n",
    "    globals()[\"Error_\" + alg][trial][mark] = np.average(globals()[\"error_\" + alg])\n",
    "    globals()[\"Norm_Err_\" + alg][trial][mark] = np.average(globals()[\"norm_err_\" + alg])\n",
    "    \n",
    "    \n",
    "    # Ridge Regression\n",
    "    alg = 'Ridge'\n",
    "    print(\"Method Ridge Regression\")\n",
    "    print(\"Training samples\", N_train)\n",
    "    start = time.time()\n",
    "    globals()[\"Theta_\"+alg] = lm.RidgeRegression(A = A_train, b = b_train, c = c_train,  z = z_train, regular_const = 1e-1)\n",
    "    globals()[\"time_\"+alg] = time.time() - start\n",
    "    print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "    globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = z_test, direct = False,\n",
    "                                                                                                    Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "    print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "    mark = 0\n",
    "    for j in range(len(globals()[focus + \"_set\"])):\n",
    "        if globals()[focus] == globals()[focus + \"_set\"][j]:\n",
    "            mark = j\n",
    "    globals()[\"Loss_\" + alg][trial][mark] = np.average(globals()[\"loss_\" + alg])\n",
    "    globals()[\"Error_\" + alg][trial][mark] = np.average(globals()[\"error_\" + alg])\n",
    "    globals()[\"Norm_Err_\" + alg][trial][mark] = np.average(globals()[\"norm_err_\" + alg])\n",
    "    \n",
    "    \n",
    "    # Polynomial Kernelized Ridge Regression\n",
    "    alg = 'PolyRidge'\n",
    "    print(\"Method PolyKer Ridge Regression\")\n",
    "    print(\"Training samples\", N_train)\n",
    "    ker_z_train = lm.PolyKernel(z = z_train, benchmark_z = z_train, gamma=1.0, degree=3, coef0=1.0)\n",
    "    ker_z_test = lm.PolyKernel(z = z_test, benchmark_z = z_train, gamma=1.0, degree=3, coef0=1.0)\n",
    "    start = time.time()\n",
    "    globals()[\"Theta_\"+alg] = lm.RidgeRegression(A = A_train, b = b_train, c = c_train,  z = ker_z_train, regular_const = 1e-2)\n",
    "    globals()[\"time_\"+alg] = time.time() - start\n",
    "    print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "    globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = ker_z_test, direct = False,\n",
    "                                                                                                    Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "    print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "    mark = 0\n",
    "    for j in range(len(globals()[focus + \"_set\"])):\n",
    "        if globals()[focus] == globals()[focus + \"_set\"][j]:\n",
    "            mark = j\n",
    "    globals()[\"Loss_\" + alg][trial][mark] = np.average(globals()[\"loss_\" + alg])\n",
    "    globals()[\"Error_\" + alg][trial][mark] = np.average(globals()[\"error_\" + alg])\n",
    "    globals()[\"Norm_Err_\" + alg][trial][mark] = np.average(globals()[\"norm_err_\" + alg])\n",
    "    \n",
    "    \n",
    "    # Rbf Kernelized Ridge Regression\n",
    "    alg = 'RbfRidge'\n",
    "    print(\"Method RbfKer Ridge Regression\")\n",
    "    print(\"Training samples\", N_train)\n",
    "    ker_z_train = lm.ExpKernel(z = z_train, benchmark_z = z_train, gamma=5e-1)\n",
    "    ker_z_test = lm.ExpKernel(z = z_test, benchmark_z = z_train, gamma=5e-1)\n",
    "    start = time.time()\n",
    "    globals()[\"Theta_\"+alg] = lm.RidgeRegression(A = A_train, b = b_train, c = c_train,  z = ker_z_train, regular_const = 1e-2)\n",
    "    globals()[\"time_\"+alg] = time.time() - start\n",
    "    print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "    globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = ker_z_test, direct = False,\n",
    "                                                                                                    Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "    print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "    mark = 0\n",
    "    for j in range(len(globals()[focus + \"_set\"])):\n",
    "        if globals()[focus] == globals()[focus + \"_set\"][j]:\n",
    "            mark = j\n",
    "    globals()[\"Loss_\" + alg][trial][mark] = np.average(globals()[\"loss_\" + alg])\n",
    "    globals()[\"Error_\" + alg][trial][mark] = np.average(globals()[\"error_\" + alg])\n",
    "    globals()[\"Norm_Err_\" + alg][trial][mark] = np.average(globals()[\"norm_err_\" + alg])\n",
    "    \n",
    "    # SPO+\n",
    "    alg = 'SPO+'\n",
    "    print(\"Method SPO+\")\n",
    "    print(\"Training samples\", N_train)\n",
    "    start = time.time()\n",
    "    globals()[\"Theta_\"+alg] = lm.SPOplus(A = A_train, b = b_train, c = c_train, z = z_train, \n",
    "                                         regular_const = 1e-2, step_size = 1e-1, batch_size = 5, max_iter = 1e3, \n",
    "                                         solved = True, solution = solution_train)\n",
    "    globals()[\"time_\"+alg] = time.time() - start\n",
    "    print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "    globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = z_test, direct = False,\n",
    "                                                                                                    Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "    print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "    mark = 0\n",
    "    for j in range(len(globals()[focus + \"_set\"])):\n",
    "        if globals()[focus] == globals()[focus + \"_set\"][j]:\n",
    "            mark = j\n",
    "    globals()[\"Loss_\" + alg][trial][mark] = np.average(globals()[\"loss_\" + alg])\n",
    "    globals()[\"Error_\" + alg][trial][mark] = np.average(globals()[\"error_\" + alg])\n",
    "    globals()[\"Norm_Err_\" + alg][trial][mark] = np.average(globals()[\"norm_err_\" + alg])\n",
    "    \n",
    "    \n",
    "    # Margin Learning\n",
    "    # Do not need true c\n",
    "    # Do not need solution x but basis\n",
    "    alg = 'ML'\n",
    "    print(\"Method SVM Margin Learning\")\n",
    "    print(\"Training samples\", N_train)\n",
    "    start = time.time()\n",
    "    globals()[\"Theta_\"+alg] = lm.MarginLearning(A = A_train, b = b_train, z = z_train, basic = basic_train, nonb = nonb_train, \n",
    "                                                regular_const = 1e-2)\n",
    "    globals()[\"time_\"+alg] = time.time() - start\n",
    "    print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "    globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = z_test, direct = False,\n",
    "                                                                                                    Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "    print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "    mark = 0\n",
    "    for j in range(len(globals()[focus + \"_set\"])):\n",
    "        if globals()[focus] == globals()[focus + \"_set\"][j]:\n",
    "            mark = j\n",
    "    globals()[\"Loss_\" + alg][trial][mark] = np.average(globals()[\"loss_\" + alg])\n",
    "    globals()[\"Error_\" + alg][trial][mark] = np.average(globals()[\"error_\" + alg])\n",
    "    globals()[\"Norm_Err_\" + alg][trial][mark] = np.average(globals()[\"norm_err_\" + alg])\n",
    "    \n",
    "    \n",
    "    # Polynomial Kernelized Margin Learning\n",
    "    # Do not need true c\n",
    "    # Do not need solution x but basis\n",
    "    alg = 'PolyKer'\n",
    "    ker_z_train = lm.PolyKernel(z = z_train, benchmark_z = z_train, gamma=1.0, degree=2, coef0=1.0)\n",
    "    ker_z_test = lm.PolyKernel(z = z_test, benchmark_z = z_train, gamma=1.0, degree=2, coef0=1.0)\n",
    "    print(\"Method Poly-Kernelized SVM Margin Learning\")\n",
    "    print(\"Training samples\", N_train)\n",
    "    start = time.time()\n",
    "    globals()[\"Theta_\"+alg] = lm.KernelizedMarginLearning(A = A_train, b = b_train, z = ker_z_train, basic = basic_train, nonb = nonb_train,\n",
    "                                                          regular_const=1e-2)\n",
    "    globals()[\"time_\"+alg] = time.time() - start\n",
    "    print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "    globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = ker_z_test, direct = False,\n",
    "                                                                                                    Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "    print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "    mark = 0\n",
    "    for j in range(len(globals()[focus + \"_set\"])):\n",
    "        if globals()[focus] == globals()[focus + \"_set\"][j]:\n",
    "            mark = j\n",
    "    globals()[\"Loss_\" + alg][trial][mark] = np.average(globals()[\"loss_\" + alg])\n",
    "    globals()[\"Error_\" + alg][trial][mark] = np.average(globals()[\"error_\" + alg])\n",
    "    globals()[\"Norm_Err_\" + alg][trial][mark] = np.average(globals()[\"norm_err_\" + alg])\n",
    "    \n",
    "    \n",
    "    # Rbf Kernelized Margin Learning\n",
    "    # Do not need true c\n",
    "    # Do not need solution x but basis\n",
    "    alg = 'ExpRbf'\n",
    "    ker_z_train = lm.ExpKernel(z = z_train, benchmark_z = z_train, gamma=2e0)\n",
    "    ker_z_test = lm.ExpKernel(z = z_test, benchmark_z = z_train, gamma=2e0)\n",
    "    print(\"Method Rbf Kernelized SVM Margin Learning\")\n",
    "    print(\"Training samples\", N_train)\n",
    "    start = time.time()\n",
    "    globals()[\"Theta_\"+alg] = lm.KernelizedMarginLearning(A = A_train, b = b_train, z = ker_z_train, basic = basic_train, nonb = nonb_train,\n",
    "                                                          regular_const=1e-3)\n",
    "    globals()[\"time_\"+alg] = time.time() - start\n",
    "    print(\"Time Cost\", globals()[\"time_\"+alg])\n",
    "    globals()[\"loss_\"+alg], globals()[\"error_\"+alg], globals()[\"norm_err_\"+alg] = lpm.ComputeLoss(benchmark = benchmark,A = A_test, b = b_test, c = c_test, z = ker_z_test, direct = False,\n",
    "                                                                                                    Theta = globals()[\"Theta_\"+alg], solved = True, solution = solution_test)\n",
    "    print(\"Loss\", np.average(globals()[\"loss_\"+alg]), \"Error\", np.average(globals()[\"error_\"+alg]), \"Normalized Error\", np.average(globals()[\"norm_err_\"+alg]))\n",
    "    mark = 0\n",
    "    for j in range(len(globals()[focus + \"_set\"])):\n",
    "        if globals()[focus] == globals()[focus + \"_set\"][j]:\n",
    "            mark = j\n",
    "    globals()[\"Loss_\" + alg][trial][mark] = np.average(globals()[\"loss_\" + alg])\n",
    "    globals()[\"Error_\" + alg][trial][mark] = np.average(globals()[\"error_\" + alg])\n",
    "    globals()[\"Norm_Err_\" + alg][trial][mark] = np.average(globals()[\"norm_err_\" + alg])\n",
    "    \n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 215,
   "id": "2e1d10d6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAUgUlEQVR4nO3dfYxcV33G8efxJo7tGGqIN4TuONhlF6K0oiUaDJSKQmmqBCIMtBKGFtQW5KYiGFpVJa0qqgr+KFJV0RUplpW4UJVi0RCQlZqGqiWCikK9foHEToKHkMSTN68TnHjZTZyNf/1jZsOwmZc7szNz7579fiTLM/dlzi/R+tk75557jiNCAIDlb1XeBQAA+oNAB4BEEOgAkAgCHQASQaADQCLOy6vhjRs3xubNm/NqHgCWpYMHD56KiNFm+3IL9M2bN2tqaiqv5gFgWbJ9f6t9dLkAQCIIdABIBIEOAInIFOi2r7J9j+2K7eub7H+T7SdsH6n/+Xj/SwUAtNPxpqjtEUk3SLpSUlXSAdv7IuLYokO/FRHXDKBGAEAGWa7Qt0qqRMS9EXFW0l5J2wZbFgCgW1kCfUzSiYb31fq2xV5v+3u2v2b7F5t9kO0dtqdsT01PT/dQLgCglSzj0N1k2+I5dw9JellEzNh+q6SvSpp43kkRuyXtlqRyucy8vSvA5OSkKpVK033ValWSVCqVWp4/Pj6unTt3DqQ2IDVZrtCrkjY1vC9JeqjxgIh4MiJm6q/3Szrf9sa+VYkkzc3NaW5uLu8ygGRkuUI/IGnC9hZJD0raLum9jQfYvkTSoxERt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02Ivr1AGMvdYyp9rN9eUTM2f6SpP0R8blBtLecr9CzrKQ0dBHxTUmP511Ho4h4OCIO1V+fkXSXcl6ApL661Uz97fn1P7lfXdguSXqbpBvzrqXIbL9Q0hsl3SRJEXG2KGFe9xZJP8wzzBucJ2mt7fMkrVOTqcX7ZTkHOqsk9cD2ZkmvlvTdnEtZ6No4IumkpP+MiNxrkvRpSX8u6VzOdTQKSV+3fdD2jryLqfsFSdOS/qnePXWj7QvzLqrBdklfzLuIiHhQ0t9JekDSw6pNLf71QbW3nAM90ypJ+Cnb6yV9WdJHI+LJvOuJiGcj4ldUWxBlq+1cu6hsXyPpZEQczLOOJt4QEVeothj7h+rdenk7T9IVkj4bEa+W9BNJRbmPtVrS2yX9WwFqeZFqPQdbJP28pAtt/96g2lvOgZ5plSTU1PupvyzpCxFxS971NKp/Vb9d0lX5VqI3SHp7vc96r6TfsP0v+ZYkRcRD9b9PSvqKat2NeatKqjZ8q7pZtYAvgqslHYqIR/MuRNJvSvpRRExHxDOSbpH0q4NqbDkHepaVlKDnbkDeJOmuiPj7vOuRJNujtjfUX69V7Qf/7jxrioi/iIhSRGxW7efpvyNiYFdTWdi+sH4jW/Uujd+SlPsIqoh4RNIJ26+sb3qLpFwHJDR4jwrQ3VL3gKTX2V5X/3f4FtXuYQ1EpgUuiqjVSko5lyXbX5T0JkkbbVcl/XVE3JRvVXqDpPdJuqPeZy1Jf1lfuCQvL5X0+fpohFWSvhQRhRgmWDAvkfSVWhboPEn/GhH/kW9Jz/mwpC/UL6juVQFWKrO9TrWRb3+Udy2SFBHftX2zpEOS5iUd1gCnAVi2wxYBAD9rOXe5AAAaEOgAkAgCHQASQaADQCIIdABIBIEOAIkg0AEgEf8P9Y7Ck5VdG38AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAA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O3MP/79B+ZObLeVC8i4pzmB9k0hzR+Eah8BlVmfht4JCJe0nzpEqDSCQkLXMEYDLc0PQy8JiLWN/8fXsL8Z1gjsW5UFx61zJyLiCuBW4G1wJ7M3F9xWUTE9cA24NyIaAAfysxPV1sVrwPeCtzdHLMG+OPMvLm6kjgP+NvmbIQ1wGcycyymCY6ZFwD/NJ8FrAP+ITM/X21JT3sP8PfNDtWDwNsrroeIWM/8zLffqboWgMz8ckR8FtgHzAF3MsLHAKzYaYuSpGdayUMukqQFDHRJKoSBLkmFMNAlqRAGuiQVwkCXpEIY6JJUiP8H/oX20Hd8rIMAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAS40lEQVR4nO3df4zk9X3f8efr9gDfQVwi39Ylt9CjArtFlZ24G+zWbXKp6+TOiUIj5Q9wast2rCuSMU77R02rNlaV/tFIbeWegn064SuJmoISmyTUOkIipYRUFunt8cM+jMFbbMMAyS2h55g7Aj7u3T9mFq+X2ZnZvdmb3c89H9Jq9/v9fGa+L6Hldd/9zHfmm6pCkrT5bZl0AEnSeFjoktQIC12SGmGhS1IjLHRJasTWSR14x44dtWvXrkkdXpI2paNHjz5fVdP9xiZW6Lt27WJubm5Sh5ekTSnJt1Yac8lFkhoxtNCTHEpyPMmxIfN+NMmrSX5+fPEkSaMa5Qz9dmDPoAlJpoBfBe4dQyZJ0hoMLfSquh94Yci0jwNfAI6PI5QkafXOeg09yU7g54ADZx9HkrRW43hR9NPAJ6vq1WETk+xLMpdkbmFhYQyHliQtGsdli7PAnUkA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+E/AU8Bzde0X8wXodbzMX+ki3vdP3JLkE+ALwS1X1l5POU1WvVtUP073D1bVJJrpEleRngONVdXSSOfp4d1W9A9gLfKy3rDdpW4F3AJ+tqh8BTgIb5XWsC4GfBX57A2T5QborB1cCPwRcnOSfrdfxNnOhj3TbO3X11qm/APxmVd016TxL9f5Uvw/YM9kkvBv42d6a9Z3AP07y3ycbCarq2d7348Dv0F1unLQO0FnyV9Xn6Rb8RrAXeLCq/nzSQYB/Anyjqhaq6rvAXcA/WK+DbeZCH+XWeOK1FyA/BzxWVf9l0nkAkkwnubT38za6v/hfm2SmqvrXVTVTVbvo/j79UVWt29nUKJJc3Hshm96Sxk8CE7+Cqqr+DHg6yVt7u94DTPSChCVuYAMst/Q8Bbwryfbe/4fvofsa1roY6Y5FG9FKt8abcCyS3AHsBnYk6QCfqqrPTTYV7wY+AHylt2YN8G96d6KalMuAX+9djbAF+K2q2hCXCW4wbwZ+p9sFbAX+R1X9/mQjvebjwG/2TqieZAPcejLJdrpXvv3zSWcBqKo/TfJ54EHgNPAQ6/gxAJv2skVJ0vfbzEsukqQlLHRJaoSFLkmNsNAlqREWuiQ1wkKXpEZY6JLUiP8PULci33jwNbgAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# degree 1\n",
    "i = 0\n",
    "data_name = [\"Loss\", \"Error\", \"Norm_Err\"]\n",
    "for data in data_name:\n",
    "    tmp = np.zeros((total_trial, len(methods)))\n",
    "    for j in range(len(methods)):\n",
    "        tmp[:, j] = globals()[data+\"_\"+methods[j]].T[i]\n",
    "    np.savetxt(os.path.join('Rebuttal2_Degree', f\"{data}_degree_{degree_set[i]}\"), tmp)\n",
    "    sns.boxplot(data = tmp, showfliers = False)\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 235,
   "id": "2279aeeb",
   "metadata": {},
   "outputs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VnW4sWkVSZcG7qq+oGvD94CZJByLi+aILkfT7kn4eEdMRcUHSHkm/263OBjnQW9nWF3rpA8h7JB2NiM8UXY8k2R61vT57PKzqH/6PiqwpIj4REaWI2KLq39P/RUTXRlOtsH159kG2simNP5BU+AqqiHhO0tO235q99G5JhS5IWOA29cF0S+YpSe+0vSb7//Ddqn6G1RVNt8/tV/W29S24LNl+QNI2SSO2K5I+HRH3FFuVbpD0AUmPZ3PWkvTJiNhbXEm6QtIXs9UIKyR9OSL6Yplgn3mjpK9Ws0ArJf1XRPxvsSW95C8l3Z8NqH6mFrbN7jbba1Rd+fYXRdciSRHxiO2vSDogaU7SQXVxG4CBXbYIAHilQZ5yAQAsQKADQCIIdABIBIEOAIkg0AEgEQQ6ACSCQAeARPw/jrlvZGXMv8sAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAASIUlEQVR4nO3df2zcd33H8ec7DqVOCwtqAnS+dOlwCosQDHak29BYoAMaQHST9kfKxkSF1FWiGLY/RjdtQxP7Z9I2MYtCFbWloLFGDMrWoZaCNDKYECxOm5Kmv3IESK8pxGkJNI1pSfLeHz5Xrnu+O9vnfM+fPB+SFX9/3fcVy3754899v3eRmUiSVr5VVQeQJPWHhS5JhbDQJakQFrokFcJCl6RCrK7qxOvWrcuNGzdWdXpJWpH27NlzNDPXt9tWWaFv3LiRiYmJqk4vSStSRPxwvm1OuUhSISx0SSqEhS5JhbDQJakQFrokFcJCl6RCWOiSVIjKrkOXpMUYHx+n0Wi03dZsNgGo1WrzHj86OsrY2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+EGwDbg7M39cdRDg94DvZ+ZkZv4CuA347eU62Uou9N3Apoi4uPUbeTtwe8WZBlLrCcibgAcy85+rzgMQEesjYm3r82Gmv/EfrDJTZv5lZtYycyPT30//nZnLNprqRUSc13oim9aUxtuAyq+gyswfAY9ExCtbqy4DKr0gYZYrGYDplpZDwG9GxJrWz+FlTD+HtSxWL9cDL7fMPBkR1wJ3AUPAzZm5v+JYRMStwFZgXUQ0gY9m5k3VpuKNwHuBfa05a4C/ysw7qovEhcBnWlcjrAI+n5kDcZnggHkZ8KXpLmA18G+Z+ZVqIz3rg8DnWgOqg8BVFechItYwfeXbn1adBSAzvxMRXwDuBk4C97CMLwOwYi9blCQ910qecpEkzWKhS1IhLHRJKoSFLkmFsNAlqRAWuiQVwkKXpEL8P9EFf8yZIzxcAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAASnUlEQVR4nO3df2yd133f8ffHkp3IcTMFFReooj15sJLNGJI245x22Vp1bhopKeot6B92uhSLW2ge4ird/ljSYWs2tMA2YBs6oU4EwdHcYp2NLlE3r7DrFljdbCjSif6RRIobh3NSm7ZW0/bUzIpqh9F3f/AqZqj7i+Ql7+XR+wUQ4vOcc+/zhUR97uG55zk3VYUkaeu7YtwFSJJGw0CXpEYY6JLUCANdkhphoEtSI7aP68K7du2qvXv3juvykrQlPfLIIy9U1VS3trEF+t69e5mdnR3X5SVpS0ryx73anHKRpEYY6JLUCANdkhphoEtSIwx0SWqEgS5JjTDQJakRY1uHLklrceTIEebm5rq2zc/PAzA9Pd3z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V38vSZm43JRnrFFWSHwOer6pHxllHF++qqnew9EEyH+5M643bduAdwCer6vuAc8CkvI91FfDjwH+egFrexNLMwfXA9wBvSPJ3N+p6WznQ3eFxFTrz1J8Bfr2qToy7nuU6v6o/DBwYbyW8C/jxzpz1fcDfSvIfx1sSVNVznT+fB36TpenGcZsH5pf9VvVplgJ+EhwEHq2qPxl3IcCPAF+tqoWq+iZwAvjrG3WxrRzoJ4F9Sa7vvCLfCtw/5pomUucNyE8BT1TVvxt3PQBJppLs7Hy/g6Uf/D8aZ01V9fNVNV1Ve1n6efrvVbVho6lhJHlD541sOlMaPwqMfQVVVf0f4Jkkb+2cuhkY64KEZW5jAqZbOp4Gvj/J1Z3/hzez9B7Whhhqc65J1GsXyDGXRZJ7gf3AriTzwMer6lPjrYp3AR8EvtiZswb4J51N18ZlN/CrndUIVwC/UVUTsUxwwrwZ+M2lLGA78J+q6rfHW9K3/Szw650B1VMMscvqRktyNUsr3/7+uGsBqKo/TPJp4FFgEXiMDdwGYMsuW5QkfaetPOUiSVrGQJekRhjoktQIA12SGmGgS1IjDHRJaoSBLkmN+P+l9THnoeb97wAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# degree 2\n",
    "i = 1\n",
    "data_name = [\"Loss\", \"Error\", \"Norm_Err\"]\n",
    "for data in data_name:\n",
    "    tmp = np.zeros((total_trial, len(methods)))\n",
    "    for j in range(len(methods)):\n",
    "        tmp[:, j] = globals()[data+\"_\"+methods[j]].T[i]\n",
    "    np.savetxt(os.path.join('Rebuttal2_Degree', f\"{data}_degree_{degree_set[i]}\"), tmp)\n",
    "    sns.boxplot(data = tmp, showfliers = False)\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 197,
   "id": "503402c1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANS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WSxq1vV7SmPo0U2tqAd7STSTw82yPS/qgpB/mXMpyV8UhSTOSHomI3GuS9PeS/kzSUs51rBSSHra93/bOvIuR9IuSZiX9a9bVdKfti/Iu6jyflnRP3kVExEuS/lbSi5KOSXo9Ih7uR1upBXhLN5HA22xfLOleSXdExBt51xMR5yLiWtXmj7/edq5dTrZvljQTEfvzrKOOGyLiOtXuOfu5rJsuT+slXSfpnyLig5LelFSIc1CSlHXpfELSfxSglveo1jPwPkm/IOki23/Qj7ZSC3BuItGGrJ/5Xklfj4j78q5npezr9z5JN+VbiW6Q9Imsz/mbkn7T9r/nW5IUES9njzOS7let+zBPVUnVFd+YvqNaoBfFxyUdiIjjeRci6bck/V9EzEbEWUn3SfqNfjSUWoBzE4kWZScM90g6GhFfy7seSbK9yfbG7PdR1d7oz+RZU0T8eUSUImJctffTf0VEX46WWmX7ouzEs7Juio9JynWEU0S8Iukntq/OFt0oKdfBA+e5RQXoPsm8KOlDtsey/8MbVTsH1XNdzQc+aEW9iYTteyTtkHS57aqkr0TEnnyr0g2SPiPpcNbnLElfzuZwz8sWSXdnowXWSfp2RBRi2F7BbJZ0f+1/X+slfSMivpdvSZKkP5b09ezg6TlJf5RzPZIk22OqjUz7bN61SFJE/ND2dyQdkLQo6aD6dFl9UsMIAQBvS60LBQCQIcABIFEEOAAkigAHgEQR4ACQKAIcABJFgANAov4fxfKSUvBSR0QAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAASfElEQVR4nO3dbYxcZ3nG8f/tdULshNQULxB24zrtOtC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ZRUSMA28DdlSdZZhFxNnAG4FrADLz2LCUedNFwPerLPMWq4E1EbEaWAs8slQDreRCHwMeanncoOKSWgkiYiPwWuC7FUeZXdrYCxwE/iMzK88EfBL4K+BkxTlaJfCNiNgTEVurDtP0y8A08Nnm8tSOiDiz6lAtLgOuqzpEZj4MfAI4ADwKPJmZ31iq8VZyoUeb5yqf4Q2ziDgLuB74SGb+pOo8mXkiM18DjAMXRESlS1QR8XbgYGbuqTJHG2/IzNcBlwAfbC7rVW018DrgM5n5WuBpYFjexzodeAfwb0OQ5UXMrBycB7wcODMi/mSpxlvJhd4Azm15PM4S/iqz0jXXqa8HvpiZN1Sdp1XzV/VvAVuqTcIbgHc016x3AW+KiC9UGwky85Hmfw8CX2FmubFqDaDR8lvVl5kp+GFwCXBbZv646iDA7wM/yMzpzPwZcAPw20s12Eou9N3Apog4r/kT+TLgxoozDaXmG5DXAPdk5j9VnQcgIkYjYl3z+zXM/MW/t8pMmfnXmTmemRuZ+fv0n5m5ZLOpXkTEmc03smkuabwZqPwMqsz8EfBQRLyi+dRFQKUnJLS4nCFYbmk6APxmRKxt/ju8iJn3sJbE6qV64aWWmccj4grgFmAE2JmZ+yqORURcB2wG1kdEA7gqM6+pNhVvAN4D3Nlcswb4m8y8qbpInAN8rnk2wirgS5k5FKcJDpmXAl+Z6QJWA/+amV+vNtKzPgR8sTmhegB4b8V5iIi1zJz59udVZwHIzO9GxJeB24DjwO0s4W0AVuxpi5Kk51rJSy6SpBYWuiQVwkKXpEJY6JJUCAtdkgphoUtSISx0SSrE/wPPC4r9Zx4ORAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM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rgUgM78XEdcBtwIzwG0s4s8ALNtli5Kkn7Wcp1wkSQ0MdEkqhIEuSYUw0CWpEAa6JBXCQJekQhjoklSI/wP99zfwrV/5pQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# degree 4\n",
    "i = 2\n",
    "data_name = [\"Loss\", \"Error\", \"Norm_Err\"]\n",
    "for data in data_name:\n",
    "    tmp = np.zeros((total_trial, len(methods)))\n",
    "    for j in range(len(methods)):\n",
    "        tmp[:, j] = globals()[data+\"_\"+methods[j]].T[i]\n",
    "    np.savetxt(os.path.join('Rebuttal2_Degree', f\"{data}_degree_{degree_set[i]}\"), tmp)\n",
    "    sns.boxplot(data = tmp, showfliers = False)\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 269,
   "id": "8f277dc9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD4CAYAAAAXUaZHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAVTklEQVR4nO3df4xd5X3n8fcXG4KNQYYwgOOLY1pP0qWRdoNGbFqkiF0327RFIaqUikiprBTJu1JaJ91KBboroZU2ErvbrZrRripZkNRRWQhLiEBV1A2lRdlKDWSMyWIw1DcJmAsGD1DDGA+Yge/+cY/LQObX/XnuPPN+SejOPeee+3yBuZ/7zHOe85zITCRJZTmj7gIkSf1nuEtSgQx3SSqQ4S5JBTLcJalA6+suAODCCy/M7du3112GJK0q+/fvfykzxxbaNxLhvn37dqampuouQ5JWlYh4ZrF9DstIUoEMd0kqkOEuSQUy3CWpQIa7JBXIcJekAi0b7hHx9Yg4FhEH5237bxHxZET8v4j4TkRsnr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R8YVBtVdKuC975ye9qxrX/jZwe2beU3c981V/zj8IfLreSrgK+Ew1vn0n8K8j4i/qLaktM5+vHo8B36E9LFmnFtCa99fW3bTDfhT8GvBIZr5YdyHArwA/zczpzHwLuAf45UE1Vkq4e+enFapOXt4GHMrMP6m7HoCIGIuIzdXPG2h/CJ6ss6bMvCkzG5m5nfbv099k5sB6WSsVEedUJ8Kphj7+DVDrbKzMfAF4NiI+Wm3aCdQ6mWGezzMCQzKVI8AnImJj9TncSfuc10AM7GYdwzSqd36KiDuAq4ELI6IF3JyZt9VbFVcBvw08Vo1xA/xRdXOVumwB9lWzGs4A7srMkZl6OGIuBr7TzgbWA/8rM/+q3pIA+D3g9qpz9RPgizXXQ0RspD2D7t/WXQtAZj4UEXcDjwBzwAEGuAxBEVMhJUnvVcqwjCRpHsNdkgpkuEtSgQx3SSqQ4S5JBTLcJalAhrskFej/A2BxEAv0e5bvAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAARXklEQVR4nO3dX4xcZ33G8e/Pf5B3Y5ChdnHqsWOqNUjARROtEtJIyCqlwmlEesFFUhUkVMktgi5pqVCLKqGiSu1FhcrILZGVpBA1DaIkQESdAmpBJBekWTsOiWPKDgSSSZx4E+o4ix2C418vdjZd1jOzs7sze2Zffz/SyjPznjPnUbL77Nlz3jknMhNJ0tq3ruoAkqT+sNAlqRAWuiQVwkKXpEJY6JJUiA1VbXjr1q25e/fuqjYvSWvS4cOHn8vMbe3GKiv03bt3Mzk5WdXmJWlNioifdBrzkIskFcJCl6R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1Uci4i4E9gLbI2IJvDJzLy12lRcA7wfeKR1zBrgE5l5qLpIXAp8vjUbYR3wxcwcimmCQ+aNwJdnu4ANwL9m5n9UG+lVfwLc0dqh+hHwwYrzEBGjzM58+6OqswBk5gMR8SXgCHAOeIgBXgZgzU5blCT9srV8yEWSNI+FLkmFsNAlqRAWuiQVwkKXpEJY6JJUCAtdkgrxfwkDXA16WH5fAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAATzElEQVR4nO3df5BdZ13H8feXTTNsGiBItlByG1NnF7TjgNa1qCAEKpoCY9XxjxbFkR8TcagF/UOqozAO/uOgDpPhR6ZTYnHUdhCKViZYndGIDgMm/QEkLW2upbSXFrIppGTbhXTTr3/sXeayvXt/7b177j55v2Z2suee85zzzc7mc5485znnRGYiSdr4nlF1AZKk4TDQJakQBrokFcJAl6RCGOiSVIhNVR14+/btuWvXrqoOL0kb0u23334yM6farass0Hft2sWRI0eqOrwkbUgR8bXV1jnkIkmFMNAlqRAGuiQVwkCXpEIY6JJUCANdkgphoEtSIbrOQ4+IA8AbgBOZ+eNt1v8G8O7m4jzwu5n5xaFWKUlN+/bto16vt13XaDQAqNVqq7afnp7m2muvHUltVeulh34jsKfD+q8Cr8rMlwDvA64fQl2S1LeFhQUWFhaqLqMyXXvomfnZiNjVYf3nWhY/D6x+apSkNerUu15et2/fvvUqZ6wMewz9rcBnhrxPSVIPhvYsl4h4NUuB/ooO2+wF9gLs3LlzWIeWJAHRyztFm0Mun253UbS5/iXAp4ArMvO+Xg48OzubPpx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0cRdwAvj3zKy8JuADwB8CT1VcR6sE/i0ibo+IvVUX0/QjwBzwN83hqRsi4vyqi2pxFXBT1UVk5teBvwQeBB4BHsvMfxvV8TZyoEebzyrv4Y2ziNgKfBJ4V2Z+p+p6MvNsZv4EUAMui4hKh6gi4g3Aicy8vco62nh5Zl4KXAG8ozmsV7VNwKXARzLzJ4HHgXG5jrUZ+GXgH8eglueyNHJwMfBC4PyI+M1RHW8jB3oDuKhlucYI/yuz0TXHqT8J/H1m3lJ1Pa2a/1U/BOypthJeDvxyc8z6ZuA1EfF31ZYEmflw888TwKdYGm6sWgNotPyv6hMsBfw4uAK4IzO/WXUhwC8AX83Mucx8ErgF+LlRHWwjB/phYCYiLm6eka8Cbq24prHUvAD5UeCezPzrqusBiIipiNjW/H6SpV/8r1RZU2b+UWbWMnMXS79P/5GZI+tN9SIizm9eyKY5pPGLQOUzqDLzG8BDEfHi5keXA5VOSGhxNWMw3NL0IPAzEbGl+e/wcpauYY3EplHteNQyczEirgFuAyaAA5l5rOKyiIibgN3A9ohoAO/NzI9WWxUvB94EfLk5Zg3wx5l5sLqSuBD4WHM2wjOAj2fmWEwTHDPPBz61lAVsAv4hM/+12pK+7/eAv292qO4H3lxxPUTEFpZmvv1O1bUAZOYXIuITwB3AInAnI3wMwIadtihJ+kEbechFktTCQJekQhjoklQIA12SCmGgS1IhDHRJKoSBLkmF+H83VEGwyMTclAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# degree 6\n",
    "i = 3\n",
    "data_name = [\"Loss\", \"Error\", \"Norm_Err\"]\n",
    "for data in data_name:\n",
    "    tmp = np.zeros((total_trial, len(methods)))\n",
    "    for j in range(len(methods)):\n",
    "        tmp[:, j] = globals()[data+\"_\"+methods[j]].T[i]\n",
    "    np.savetxt(os.path.join('Rebuttal2_Degree', f\"{data}_degree_{degree_set[i]}\"), tmp)\n",
    "    sns.boxplot(data = tmp, showfliers = False)\n",
    "    plt.show()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
